Skip to content

Commit 41f3398

Browse files
authored
Merge pull request #33 from leemthompo/notebooks-readme-updates
Add readmes to notebook folders
2 parents d872f1b + 4c3e281 commit 41f3398

File tree

8 files changed

+411
-295
lines changed

8 files changed

+411
-295
lines changed

notebooks/generative-ai/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Generative AI notebooks
2+
3+
This folder contains notebooks that demonstrate various use cases for Elasticsearch as the retrieval engine and vector store for LLM-powered applications.
4+
5+
The following notebooks are available:
6+
7+
- [Question answering](#question-answering)
8+
<!-- - [Chatbot](#chatbot) -->
9+
10+
## Notebooks
11+
12+
### Question answering
13+
14+
In the [`question-answering.ipynb`](./question-answering.ipynb) notebook you'll learn how to:
15+
16+
- Retrieve sample workplace documents from a given URL.
17+
- Set up an Elasticsearch client.
18+
- Chunk documents into 800-token passages with an overlap of 400 tokens using the `CharacterTextSplitter` from `langchain`.
19+
- Use `OpenAIEmbeddings` from `langchain` to create embeddings for the content.
20+
- Retrieve embeddings for the chunked passages using OpenAI.
21+
- Persist the passage documents along with their embeddings into Elasticsearch.
22+
- Set up a question-answering system using `OpenAI` and `ElasticKnnSearch` from `langchain` to retrieve answers along with their source documents.
23+
24+
<!-- ### Chatbot
25+
26+
In the [`chatbot.ipynb`](./chatbot.ipynb) notebook you'll learn how to: -->

notebooks/generative-ai/question-answering.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
},
4343
"outputs": [],
4444
"source": [
45-
"!pip install -qU langchain jq openai elasticsearch tiktoken"
45+
"!pip install -qU langchain jq openai elasticsearch"
4646
]
4747
},
4848
{

notebooks/integrations/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Integrations notebooks
2+
3+
The following subfolders contain notebooks that demonstrate how to integrate popular services and projects with Elasticsearch:
4+
5+
- [OpenAI](./openai/README.md)
6+
- [Hugging Face](./hugging-face/README.md)
7+
- [LlamaIndex](./llama-index/README.md)
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Hugging Face integrations notebooks
2+
3+
This folder contains notebooks that demonstrate how to work with Hugging Face hosted models in Elasticsearch.
4+
5+
The following notebooks are available:
6+
7+
- [Loading an NLP model from Hugging Face](#loading-an-nlp-model-from-hugging-face)
8+
9+
## Notebooks
10+
11+
### Loading an NLP model from Hugging Face
12+
13+
In the [`loading-model-from-hugging-face.ipynb`](./loading-model-from-hugging-face.ipynb) notebook you'll learn how to:
14+
15+
- Use the `eland` tool to import the [`all-MiniLM-L6-v2`](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) model from Hugging Face.
16+
- Index documents into Elasticsearch and generate text embeddings using an ingest pipeline.
17+
- Transform search queries into vectors using the Hugging Face model and perform vector searches over the dataset.
18+

notebooks/integrations/hugging-face/loading-model-from-hugging-face.ipynb

Lines changed: 295 additions & 294 deletions
Large diffs are not rendered by default.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# LlamaIndex notebooks
2+
3+
This folder contains notebooks that demonstrate how to work with the LlamaIndex data framework using Elasticsearch.
4+
5+
<!-- The following notebooks are available:
6+
The following notebooks are available:
7+
8+
0. [Quick start](#0-quick-start)
9+
1. [Keyword, querying, filtering](#1-keyword-querying-filtering)
10+
2. [Hybrid search](#2-hybrid-search)
11+
3. [Semantic search with ELSER](#3-semantic-search-with-elser)
12+
4. [Multilingual semantic search](#4-multilingual-semantic-search)
13+
14+
## Notebooks
15+
16+
### <NOTEBOOK_NAME>
17+
--->
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# OpenAI integrations notebooks
2+
3+
This folder contains notebooks that demonstrate how to integrate popular OpenAI services with Elasticsearch.
4+
5+
The following notebooks are available:
6+
7+
- [OpenAI embeddings and retrieval augmented generation (RAG)](#openai-embeddings-and-retrieval-augmented-generation-rag)
8+
9+
## Notebooks
10+
11+
### OpenAI embeddings and retrieval augmented generation (RAG)
12+
13+
In the [`openai-KNN-RAG.ipynb`](./openai-KNN-RAG.ipynb) notebook you'll learn how to:
14+
15+
- Index the OpenAI Wikipedia vector dataset into Elasticsearch.
16+
- Embed a question with the OpenAI embeddings endpoint.
17+
- Perform semantic search on the Elasticsearch index using the encoded question.
18+
- Send the top search results to the OpenAI Chat Completions API endpoint for retrieval augmented generation (RAG).
19+
- Use OpenAI's model to generate a response for a given conversation.
20+
- Set a system message which defines the assistant's role and how user messages are processed.
21+

notebooks/langchain/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# LangChain notebooks
2+
3+
This folder contains notebooks that demonstrate how to use Elasticsearch with the LangChain framework for building applications powered by language models.
4+
5+
<!--
6+
The following notebooks are available:
7+
8+
- [Embeddings](#embeddings)
9+
- [Vector store](#vector-store)
10+
11+
## Notebooks
12+
13+
### Embeddings
14+
15+
In the [`langchain-elasticsearch-embeddings.ipynb`](./langchain-elasticsearch-embeddings.ipynb) notebook you'll learn how to:
16+
17+
-
18+
-
19+
20+
### Vector store
21+
22+
In the [`langchain-vector-store.ipynb`](./langchain-vector-store.ipynb) notebook you'll learn how to:
23+
24+
-
25+
-
26+
-->

0 commit comments

Comments
 (0)