This application is built as an extension to this
- Data retrieval: With both RAG and DB search (via API created from Flask)
- Routing: Use Function Call for autonomous tool choice & invocation
- UI Via Streamlit
- Embedding model: all-MiniLM-L6-v2
- Vector Database: Haystack's InMemoryDocumentStore
- LLM: GPT-4 Turbo accessed via OpenRouter. But the flow can be adapted into using other LLMs
- LLM Framework: Haystack for their great documentations, and transparency in pipeline construction. This tutorial is actually an extension to their fantastic tutorial for the same topic
- Create and activate a virtual environment, then
pip install -r requirements.txt
to install the required packages - Spin up the API server with
python db_api.py
- If you are seeking for an initial tutorial for the concept behind, run
rag_plus_db_search.ipynb
. Or proceed to #3 directly - Run the streamlit application with the below
export OPENROUTER_API_KEY = '@REPLACE WITH YOUR API KEY'
cd streamlit
streamlit run app.py