QAService is a template for deploying a QA system using RAG (Retrieval Augmented Generation) technology.
To deploy the service you need to have Docker compose installed:
- Upload documents to the documents folder
- python create_chroma.py
- Fill in the
.env(at a minimumOPENAI_API_KEY) - Copy everything to the remote server
docker-compose up -d -build
Depending on how start.py is configured, you may be able to run
UvicornService- RestAPITG_Service- Telegram botST_Service- StreamLit
You can customize the RAG system by changing:
- The way of reading and splitting documents (by
RecursiveCharacterTextSplitter) - Choose a different VectorStore (default is
ChormaDB) - Choose a different Embedding model (default
text-embedding-3-small) - Select a different retriever method
- Select a different LLM (optional
gpt-3.5-turbo)
Query information is logged to PosgresQL database, with PGAdmin interface.
Also based on TruLens and Ragas, tracking of system parameters is implemented:
context_relevance, answer_relevance, groundednesscontext_precision, context_recall, faithfulness, answer_relevancy