mirror of
https://github.com/openai/openai-cookbook
synced 2024-11-11 13:11:02 +00:00
31b4de22a3
* Add Elasticsearch to vector databases, add notebooks * Update prompt * Make intro verbiage more neutral * Add semantic search notebook outputs * Add RAG notebook output * Update query * Remove unreadable vector output
1.5 KiB
1.5 KiB
Elasticsearch
Elasticsearch is a popular search/analytics engine and vector database. Elasticsearch offers an efficient way to create, store, and search vector embeddings at scale.
For technical details, refer to the Elasticsearch documentation.
The elasticsearch-labs
repo contains executable Python notebooks, sample apps, and resources for testing out the Elastic platform.
OpenAI cookbook notebooks 📒
Check out our notebooks in this repo for working with OpenAI, using Elasticsearch as your vector database.
Semantic search
In this notebook you'll learn how to:
- Index the OpenAI Wikipedia embeddings dataset into Elasticsearch
- Encode a question with the
openai ada-02
model - Perform a semantic search
Retrieval augmented generation
This notebooks builds on the semantic search notebook by:
- Selecting the top hit from a semantic search
- Sending that result to the OpenAI Chat Completions API endpoint for retrieval augmented generation (RAG)