Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jeffvestal/elasticdocs_gpt
Combining the search power of Elasticsearch with the Question Answering power of GPT
https://github.com/jeffvestal/elasticdocs_gpt
Last synced: about 2 months ago
JSON representation
Combining the search power of Elasticsearch with the Question Answering power of GPT
- Host: GitHub
- URL: https://github.com/jeffvestal/elasticdocs_gpt
- Owner: jeffvestal
- License: gpl-3.0
- Created: 2023-04-11T15:39:48.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-13T15:27:01.000Z (about 1 year ago)
- Last Synced: 2024-10-08T13:10:14.587Z (3 months ago)
- Language: Jupyter Notebook
- Size: 1.92 MB
- Stars: 81
- Watchers: 3
- Forks: 40
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ElasticDocs_GPT
Combining the search power of Elasticsearch with the Question Answering power of GPT[Blog - ChatGPT and Elasticsearch: OpenAI meets private data](https://www.elastic.co/blog/chatgpt-elasticsearch-openai-meets-private-data)
![diagram](https://raw.githubusercontent.com/jeffvestal/ElasticDocs_GPT/main/images/ElasticChat%20GPT%20Diagram%20-%20No%20line%20text.jpeg)
1. 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
2. Search request is sent to Elasticsearch
3. Documentation body and original url are returned to python
4. API call is made to OpenAI ChatCompletion
- Prompt: "answer this question using only this document "
5. Generated response is returned to python
6. Python adds on original documentation source url to generated response and prints it to the screen for the user# Examples
![autoscale](https://raw.githubusercontent.com/jeffvestal/ElasticDocs_GPT/main/images/elasticDocs%20GPT%20-%20elastic%20cloud%20autoscaling.png)
![apm](https://raw.githubusercontent.com/jeffvestal/ElasticDocs_GPT/main/images/elasticDocs%20GPT%20-%20elastic%20jvm%20apm.png)
![inference](https://github.com/jeffvestal/ElasticDocs_GPT/blob/main/images/elasticDocs%20GPT%20-%20inference%20processor.png)
![pii](https://raw.githubusercontent.com/jeffvestal/ElasticDocs_GPT/main/images/elasticDocs%20GPT%20-%20redact%20pii.png)