mirror of
https://github.com/aljazceru/ElasticDocs_GPT.git
synced 2025-12-17 05:44:20 +01:00
4d2cbaeae5be6e3dfbea3c8bff3e7db24035f966
ElasticDocs_GPT
Combining the search power of Elasticsearch with the Question Answering power of GPT
Blog Forthcoming
- Python interface accepts user questions
- Generate a hybrid search request for Elasticsearch
- BM25 match on the title field
- kNN search on the title-vector field
- Boost kNN search results to align scores
- Set size=1 to return only the top scored document
- Search request is sent to Elasticsearch
- Documentation body and original url are returned to python
- API call is made to OpenAI ChatCompletion
- Prompt: "answer this question using only this document <body_content from top search result>"
- Generated response is returned to python
- Python adds on original documentation source url to generated response and prints it to the screen for the user
Languages
Jupyter Notebook
68.2%
Python
31.8%
