Added a simple RAG functionality to the EAK-Copilot.
Issue Reference:
79
105
107
97
134
110
135
112
Changes Made
Added rag/app/main.py to implement the /init_expert, /get_docs, /rerank and /embed endpoints.
Added rag/app/models.py to implement the ResponseBody and RAGRequest model classes.
Added rag/app/test_semantic_search.py to run a simple semantic search query.
Added rag/Dockerfile to build the rag image.
Added rag/requirements.txt.
Updated docker-compose.yml to include the rag service.
Updated .env.example to include the postgresql port number.
Updated the README.md.
Testing
Tested endpoints manually through swagger docs at localhost:8010/docs.
Removed the db/data folder to index docs from scratch.
Ran rag/app/test_semantic_search.py.
Screenshots
None
Additional Notes
Crawling/Scraping/Indexing of fedlex.ch, ahv-iv.ch, zas.admin.ch and bsv.admin.ch will be implemented in a future sprint. For the moment only dummy data is indexed.
Auto data crawling/scraping/indexing will be configured from the main config.yaml file in the future (for the moment this process is manual).
Overview
Added a simple RAG functionality to the EAK-Copilot.
Issue Reference:
79
105
107
97
134
110
135
112
Changes Made
Testing
Screenshots
None
Additional Notes
Requested Reviewers
@tabee