From 12847f253d10972e9bfd6d22de16f7746be6bfc7 Mon Sep 17 00:00:00 2001 From: Linghua Jin Date: Sun, 18 May 2025 16:12:57 -0700 Subject: [PATCH 01/15] update product recommendation example description --- README.md | 2 +- examples/product_recommendation/README.md | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8b3cb3a2..3c7a9a93 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,7 @@ It defines an index flow like this: | [Docs to Knowledge Graph](examples/docs_to_knowledge_graph) | Extract relationships from Markdown documents and build a knowledge graph | | [Embeddings to Qdrant](examples/text_embedding_qdrant) | Index documents in a Qdrant collection for semantic search | | [FastAPI Server with Docker](examples/fastapi_server_docker) | Run the semantic search server in a Dockerized FastAPI setup | -| [Product Recommendation](examples/product_recommendation) | Build real-time product recommendations with LLM and graph database| +| [Recommendation Engine with Knowledge Graph](examples/product_taxonomy_knowledge_graph) | Build real-time product recommendations with LLM and knowledge graph | | [Image Search with Vision API](examples/image_search_example) | Generates detailed captions for images using a vision model, embeds them, enables live-updating semantic search via FastAPI and served on a React frontend| More coming and stay tuned 👀! diff --git a/examples/product_recommendation/README.md b/examples/product_recommendation/README.md index 96565782..24da1f06 100644 --- a/examples/product_recommendation/README.md +++ b/examples/product_recommendation/README.md @@ -1,8 +1,6 @@ -# Build Real-Time Recommendation Engine with LLM and Graph Database +# Build Real-Time Recommendation Engine with LLM and Knowledge Graph -We will build a real-time product recommendation engine with LLM and graph database. In particular, we will use LLM to understand the category (taxonomy) of a product. In addition, we will use LLM to enumerate the complementary products - users are likely to buy together with the current product (pencil and notebook). - -We will use Graph to explore the relationships between products that can be further used for product recommendations or labeling. +We will process a list of products and use LLM to extract the taxonomy and complimentary taxonomy for each product and find connections between products. Please drop [CocoIndex on Github](https://github.com/cocoindex-io/cocoindex) a star to support us and stay tuned for more updates. Thank you so much 🥥🤗. [![GitHub](https://img.shields.io/github/stars/cocoindex-io/cocoindex?color=5B5BD6)](https://github.com/cocoindex-io/cocoindex) From db5cd92ce35b028c93fffd7e75570128ab414666 Mon Sep 17 00:00:00 2001 From: Linghua Jin Date: Sun, 18 May 2025 16:54:12 -0700 Subject: [PATCH 02/15] rename folder --- examples/product_recommendation/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/product_recommendation/README.md b/examples/product_recommendation/README.md index 24da1f06..c554655b 100644 --- a/examples/product_recommendation/README.md +++ b/examples/product_recommendation/README.md @@ -1,6 +1,8 @@ # Build Real-Time Recommendation Engine with LLM and Knowledge Graph -We will process a list of products and use LLM to extract the taxonomy and complimentary taxonomy for each product and find connections between products. +We will build a real-time product recommendation engine with LLM and knowledge graph. In particular, we will use LLM to understand the category (taxonomy) of a product. In addition, we will use LLM to enumerate the complementary products - users are likely to buy together with the current product (pencil and notebook). + +We will use Knowledge Graph to explore the relationships between products that can be further used for product recommendations or labeling. Please drop [CocoIndex on Github](https://github.com/cocoindex-io/cocoindex) a star to support us and stay tuned for more updates. Thank you so much 🥥🤗. [![GitHub](https://img.shields.io/github/stars/cocoindex-io/cocoindex?color=5B5BD6)](https://github.com/cocoindex-io/cocoindex) From 9c3f018ed8b5cbc761f952cc81c4d41ffe17a5e1 Mon Sep 17 00:00:00 2001 From: Linghua Jin Date: Sun, 18 May 2025 16:54:40 -0700 Subject: [PATCH 03/15] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3c7a9a93..b09e7621 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,7 @@ It defines an index flow like this: | [Docs to Knowledge Graph](examples/docs_to_knowledge_graph) | Extract relationships from Markdown documents and build a knowledge graph | | [Embeddings to Qdrant](examples/text_embedding_qdrant) | Index documents in a Qdrant collection for semantic search | | [FastAPI Server with Docker](examples/fastapi_server_docker) | Run the semantic search server in a Dockerized FastAPI setup | -| [Recommendation Engine with Knowledge Graph](examples/product_taxonomy_knowledge_graph) | Build real-time product recommendations with LLM and knowledge graph | +| [Product Recommendation with Knowledge Graph](examples/product_recommendation) | Build real-time product recommendations with LLM and knowledge graph | | [Image Search with Vision API](examples/image_search_example) | Generates detailed captions for images using a vision model, embeds them, enables live-updating semantic search via FastAPI and served on a React frontend| More coming and stay tuned 👀! From a319b534e32a738a027b4fd794d32a17785fae34 Mon Sep 17 00:00:00 2001 From: Linghua Jin Date: Sun, 18 May 2025 16:56:18 -0700 Subject: [PATCH 04/15] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b09e7621..8b3cb3a2 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,7 @@ It defines an index flow like this: | [Docs to Knowledge Graph](examples/docs_to_knowledge_graph) | Extract relationships from Markdown documents and build a knowledge graph | | [Embeddings to Qdrant](examples/text_embedding_qdrant) | Index documents in a Qdrant collection for semantic search | | [FastAPI Server with Docker](examples/fastapi_server_docker) | Run the semantic search server in a Dockerized FastAPI setup | -| [Product Recommendation with Knowledge Graph](examples/product_recommendation) | Build real-time product recommendations with LLM and knowledge graph | +| [Product Recommendation](examples/product_recommendation) | Build real-time product recommendations with LLM and graph database| | [Image Search with Vision API](examples/image_search_example) | Generates detailed captions for images using a vision model, embeds them, enables live-updating semantic search via FastAPI and served on a React frontend| More coming and stay tuned 👀! From b245d648a16e5fd9d40e3156f14914c41e29e912 Mon Sep 17 00:00:00 2001 From: Linghua Jin Date: Sun, 18 May 2025 17:07:15 -0700 Subject: [PATCH 05/15] Update README.md --- examples/product_recommendation/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/product_recommendation/README.md b/examples/product_recommendation/README.md index c554655b..51552a6b 100644 --- a/examples/product_recommendation/README.md +++ b/examples/product_recommendation/README.md @@ -1,6 +1,6 @@ -# Build Real-Time Recommendation Engine with LLM and Knowledge Graph +# Build Real-Time Recommendation Engine with LLM and Graph Database -We will build a real-time product recommendation engine with LLM and knowledge graph. In particular, we will use LLM to understand the category (taxonomy) of a product. In addition, we will use LLM to enumerate the complementary products - users are likely to buy together with the current product (pencil and notebook). +We will build a real-time product recommendation engine with LLM and graph database. In particular, we will use LLM to understand the category (taxonomy) of a product. In addition, we will use LLM to enumerate the complementary products - users are likely to buy together with the current product (pencil and notebook). We will use Knowledge Graph to explore the relationships between products that can be further used for product recommendations or labeling. From a55c2f503c3ae804607cbcda50ee05afa96b5780 Mon Sep 17 00:00:00 2001 From: Linghua Jin Date: Sun, 18 May 2025 17:07:46 -0700 Subject: [PATCH 06/15] Update README.md --- examples/product_recommendation/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/product_recommendation/README.md b/examples/product_recommendation/README.md index 51552a6b..96565782 100644 --- a/examples/product_recommendation/README.md +++ b/examples/product_recommendation/README.md @@ -2,7 +2,7 @@ We will build a real-time product recommendation engine with LLM and graph database. In particular, we will use LLM to understand the category (taxonomy) of a product. In addition, we will use LLM to enumerate the complementary products - users are likely to buy together with the current product (pencil and notebook). -We will use Knowledge Graph to explore the relationships between products that can be further used for product recommendations or labeling. +We will use Graph to explore the relationships between products that can be further used for product recommendations or labeling. Please drop [CocoIndex on Github](https://github.com/cocoindex-io/cocoindex) a star to support us and stay tuned for more updates. Thank you so much 🥥🤗. [![GitHub](https://img.shields.io/github/stars/cocoindex-io/cocoindex?color=5B5BD6)](https://github.com/cocoindex-io/cocoindex) From 172759b0b73897f09ae4c192d63bbf4fc8ab04ed Mon Sep 17 00:00:00 2001 From: Linghua Jin Date: Mon, 19 May 2025 17:49:08 -0700 Subject: [PATCH 07/15] update text_embedding with new query handler --- examples/text_embedding/README.md | 4 +++- examples/text_embedding/main.py | 14 +++----------- examples/text_embedding/pyproject.toml | 2 +- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/examples/text_embedding/README.md b/examples/text_embedding/README.md index 68cd4ec2..d873b718 100644 --- a/examples/text_embedding/README.md +++ b/examples/text_embedding/README.md @@ -1,4 +1,6 @@ -Simple example for cocoindex: build embedding index based on local files. +Build text embedding and semantic search based on local files. + +In this example, we will build a text embedding index and a semantic search flow based on local markdown files. [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/cocoindex-io/cocoindex/blob/main/examples/text_embedding/Text_Embedding.ipynb) diff --git a/examples/text_embedding/main.py b/examples/text_embedding/main.py index 8177cdfc..df7ac740 100644 --- a/examples/text_embedding/main.py +++ b/examples/text_embedding/main.py @@ -1,7 +1,6 @@ import os from dotenv import load_dotenv from psycopg_pool import ConnectionPool - import cocoindex @cocoindex.transform_flow() @@ -43,15 +42,6 @@ def text_embedding_flow(flow_builder: cocoindex.FlowBuilder, data_scope: cocoind field_name="embedding", metric=cocoindex.VectorSimilarityMetric.COSINE_SIMILARITY)]) -# Keep for now to allow CocoInsight to query. -# Will be removed later after we expose `search()` below as a query function (https://github.com/cocoindex-io/cocoindex/issues/502). -cocoindex.query.SimpleSemanticsQueryHandler( - name="SemanticsSearch", - flow=text_embedding_flow, - target_name="doc_embeddings", - query_transform_flow=text_to_embedding, - default_similarity_metric=cocoindex.VectorSimilarityMetric.COSINE_SIMILARITY) - def search(pool: ConnectionPool, query: str, top_k: int = 5): table_name = cocoindex.utils.get_target_storage_default_name(text_embedding_flow, "doc_embeddings") query_vector = text_to_embedding.eval(query) @@ -70,6 +60,7 @@ def search(pool: ConnectionPool, query: str, top_k: int = 5): @cocoindex.main_fn() def _run(): + # Initialize the database connection pool. pool = ConnectionPool(os.getenv("COCOINDEX_DATABASE_URL")) # Run queries in a loop to demonstrate the query capabilities. while True: @@ -77,10 +68,11 @@ def _run(): query = input("Enter search query (or Enter to quit): ") if query == '': break + # Run the query function with the database connection pool and the query. results = search(pool, query) print("\nSearch results:") for result in results: - print(f"[{result['score']:.3f}] {result['filename']} location:{result['location']}") + print(f"[{result['score']:.3f}] {result['filename']}") print(f" {result['text']}") print("---") print() diff --git a/examples/text_embedding/pyproject.toml b/examples/text_embedding/pyproject.toml index 3add7d0b..08129111 100644 --- a/examples/text_embedding/pyproject.toml +++ b/examples/text_embedding/pyproject.toml @@ -4,7 +4,7 @@ version = "0.1.0" description = "Simple example for cocoindex: build embedding index based on local text files." requires-python = ">=3.10" dependencies = [ - "cocoindex>=0.1.39", + "cocoindex>=0.1.40", "python-dotenv>=1.0.1", "psycopg[binary,pool]", ] From 5bdece296a25cf5666b741b561b2b785b8be5ed1 Mon Sep 17 00:00:00 2001 From: LJ Date: Mon, 19 May 2025 18:01:29 -0700 Subject: [PATCH 08/15] Update README.md --- examples/text_embedding/README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/examples/text_embedding/README.md b/examples/text_embedding/README.md index d873b718..8c29654c 100644 --- a/examples/text_embedding/README.md +++ b/examples/text_embedding/README.md @@ -1,8 +1,15 @@ -Build text embedding and semantic search based on local files. +# Build text embedding and semantic search +[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/cocoindex-io/cocoindex/blob/main/examples/text_embedding/Text_Embedding.ipynb) + In this example, we will build a text embedding index and a semantic search flow based on local markdown files. -[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/cocoindex-io/cocoindex/blob/main/examples/text_embedding/Text_Embedding.ipynb) + +Screenshot 2025-05-19 at 5 48 28 PM + +We will ingest from a list of local files. For each file, perform chunking (Recursive Split) and then embeddings. +We will save the embeddings and the metadata in Postgres with PGVector. +And then add a simpler query handler for semantic search. ## Prerequisite From 6f4cc2616b280420fa3892679189a60feb9ea7d7 Mon Sep 17 00:00:00 2001 From: LJ Date: Mon, 19 May 2025 18:02:01 -0700 Subject: [PATCH 09/15] Update README.md --- examples/text_embedding/README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/text_embedding/README.md b/examples/text_embedding/README.md index 8c29654c..becbcb53 100644 --- a/examples/text_embedding/README.md +++ b/examples/text_embedding/README.md @@ -7,9 +7,10 @@ In this example, we will build a text embedding index and a semantic search flow Screenshot 2025-05-19 at 5 48 28 PM -We will ingest from a list of local files. For each file, perform chunking (Recursive Split) and then embeddings. -We will save the embeddings and the metadata in Postgres with PGVector. -And then add a simpler query handler for semantic search. +- We will ingest from a list of local files. +- For each file, perform chunking (Recursive Split) and then embeddings. +- We will save the embeddings and the metadata in Postgres with PGVector. +- And then add a simpler query handler for semantic search. ## Prerequisite From de5af006ca898e2ed3004225918b1f4fc9218498 Mon Sep 17 00:00:00 2001 From: LJ Date: Mon, 19 May 2025 18:11:22 -0700 Subject: [PATCH 10/15] Update README.md --- examples/text_embedding/README.md | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/examples/text_embedding/README.md b/examples/text_embedding/README.md index becbcb53..618f854c 100644 --- a/examples/text_embedding/README.md +++ b/examples/text_embedding/README.md @@ -1,16 +1,21 @@ -# Build text embedding and semantic search +# Build text embedding and semantic search 🔍 [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/cocoindex-io/cocoindex/blob/main/examples/text_embedding/Text_Embedding.ipynb) +[![GitHub](https://img.shields.io/github/stars/cocoindex-io/cocoindex?color=5B5BD6)](https://github.com/cocoindex-io/cocoindex) +In this example, we will build index flow from text embedding from local markdown files. And build semantic search with simple query handler. -In this example, we will build a text embedding index and a semantic search flow based on local markdown files. - +We appreicate a star ⭐ at [CocoIndex Github](https://github.com/cocoindex-io/cocoindex) if this is helpful. Screenshot 2025-05-19 at 5 48 28 PM -- We will ingest from a list of local files. -- For each file, perform chunking (Recursive Split) and then embeddings. -- We will save the embeddings and the metadata in Postgres with PGVector. -- And then add a simpler query handler for semantic search. +Steps: +1. We will ingest from a list of local files. +2. For each file, perform chunking (Recursive Split) and then embeddings. +3. We will save the embeddings and the metadata in Postgres with PGVector. +4. And then add a simpler query handler for semantic search. + +🌱 A detailed step by step tutorial can be found here: [Get Started Documentation](https://cocoindex.io/docs/getting_started/quickstart) + ## Prerequisite @@ -44,9 +49,8 @@ python main.py ## CocoInsight -CocoInsight is in Early Access now (Free) 😊 You found us! A quick 3 minute video tutorial about CocoInsight: [Watch on YouTube](https://youtu.be/ZnmyoHslBSc?si=pPLXWALztkA710r9). - -Run CocoInsight to understand your RAG data pipeline: +I used CocoInsight (Free beta now) to troubleshoot the index generation and understand the data lineage of the pipeline. +It just connects to your local CocoIndex server, with Zero pipeline data retention. Run following command to start CocoInsight: ``` python main.py cocoindex server -ci From 38382fb55e48497ecfead2bb77a77784a7f4668c Mon Sep 17 00:00:00 2001 From: Linghua Jin Date: Mon, 19 May 2025 18:14:44 -0700 Subject: [PATCH 11/15] Update main.py --- examples/text_embedding/main.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/examples/text_embedding/main.py b/examples/text_embedding/main.py index df7ac740..e69e1e7c 100644 --- a/examples/text_embedding/main.py +++ b/examples/text_embedding/main.py @@ -1,7 +1,7 @@ -import os from dotenv import load_dotenv from psycopg_pool import ConnectionPool import cocoindex +import os @cocoindex.transform_flow() def text_to_embedding(text: cocoindex.DataSlice[str]) -> cocoindex.DataSlice[list[float]]: @@ -19,7 +19,7 @@ def text_embedding_flow(flow_builder: cocoindex.FlowBuilder, data_scope: cocoind Define an example flow that embeds text into a vector database. """ data_scope["documents"] = flow_builder.add_source( - cocoindex.sources.LocalFile(path="markdown_files", included_patterns=["*.md"])) + cocoindex.sources.LocalFile(path="markdown_files")) doc_embeddings = data_scope.add_collector() @@ -42,19 +42,21 @@ def text_embedding_flow(flow_builder: cocoindex.FlowBuilder, data_scope: cocoind field_name="embedding", metric=cocoindex.VectorSimilarityMetric.COSINE_SIMILARITY)]) + def search(pool: ConnectionPool, query: str, top_k: int = 5): + # Get the table name, for the export target in the text_embedding_flow above. table_name = cocoindex.utils.get_target_storage_default_name(text_embedding_flow, "doc_embeddings") + # Evaluate the transform flow defined above with the input query, to get the embedding. query_vector = text_to_embedding.eval(query) + # Run the query and get the results. with pool.connection() as conn: with conn.cursor() as cur: cur.execute(f""" - SELECT filename, location, text, embedding <=> %s::vector AS distance - FROM {table_name} - ORDER BY distance - LIMIT %s + SELECT filename, text, embedding <=> %s::vector AS distance + FROM {table_name} ORDER BY distance LIMIT %s """, (query_vector, top_k)) return [ - {"filename": row[0], "location": row[1], "text": row[2], "score": 1.0 - row[3]} + {"filename": row[0], "text": row[1], "score": 1.0 - row[2]} for row in cur.fetchall() ] From 84eb0726c808db25a9103b0496d3ddad710be5b6 Mon Sep 17 00:00:00 2001 From: Linghua Jin Date: Mon, 19 May 2025 18:20:44 -0700 Subject: [PATCH 12/15] Update README.md --- examples/text_embedding/README.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/examples/text_embedding/README.md b/examples/text_embedding/README.md index 618f854c..aba3e16d 100644 --- a/examples/text_embedding/README.md +++ b/examples/text_embedding/README.md @@ -2,17 +2,20 @@ [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/cocoindex-io/cocoindex/blob/main/examples/text_embedding/Text_Embedding.ipynb) [![GitHub](https://img.shields.io/github/stars/cocoindex-io/cocoindex?color=5B5BD6)](https://github.com/cocoindex-io/cocoindex) -In this example, we will build index flow from text embedding from local markdown files. And build semantic search with simple query handler. +In this example, we will build index flow from text embedding from local markdown files. And provide an simple example to query the index. We appreicate a star ⭐ at [CocoIndex Github](https://github.com/cocoindex-io/cocoindex) if this is helpful. Screenshot 2025-05-19 at 5 48 28 PM Steps: -1. We will ingest from a list of local files. -2. For each file, perform chunking (Recursive Split) and then embeddings. -3. We will save the embeddings and the metadata in Postgres with PGVector. -4. And then add a simpler query handler for semantic search. +- Indexing Flow: + 1. We will ingest from a list of local files. + 2. For each file, perform chunking (Recursive Split) and then embeddings. + 3. We will save the embeddings and the metadata in Postgres with PGVector. + +- Query: +1. We will match against user-provided text by a SQL query, reusing the embedding operation in the indexing flow. 🌱 A detailed step by step tutorial can be found here: [Get Started Documentation](https://cocoindex.io/docs/getting_started/quickstart) From f43370fa328da9faaf32054930d3afbcf1243a9e Mon Sep 17 00:00:00 2001 From: Linghua Jin Date: Mon, 19 May 2025 18:21:39 -0700 Subject: [PATCH 13/15] Update README.md --- examples/text_embedding/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/text_embedding/README.md b/examples/text_embedding/README.md index aba3e16d..809b2de7 100644 --- a/examples/text_embedding/README.md +++ b/examples/text_embedding/README.md @@ -2,7 +2,7 @@ [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/cocoindex-io/cocoindex/blob/main/examples/text_embedding/Text_Embedding.ipynb) [![GitHub](https://img.shields.io/github/stars/cocoindex-io/cocoindex?color=5B5BD6)](https://github.com/cocoindex-io/cocoindex) -In this example, we will build index flow from text embedding from local markdown files. And provide an simple example to query the index. +In this example, we will build index flow from text embedding from local markdown files, and query the index. We appreicate a star ⭐ at [CocoIndex Github](https://github.com/cocoindex-io/cocoindex) if this is helpful. From 7d0dde12c75fb32014c5a93ed56a04b8525bdc77 Mon Sep 17 00:00:00 2001 From: LJ Date: Mon, 19 May 2025 18:23:39 -0700 Subject: [PATCH 14/15] Update README.md --- examples/text_embedding/README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/text_embedding/README.md b/examples/text_embedding/README.md index 809b2de7..f5b39f97 100644 --- a/examples/text_embedding/README.md +++ b/examples/text_embedding/README.md @@ -6,19 +6,19 @@ In this example, we will build index flow from text embedding from local markdow We appreicate a star ⭐ at [CocoIndex Github](https://github.com/cocoindex-io/cocoindex) if this is helpful. -Screenshot 2025-05-19 at 5 48 28 PM +## Steps: +🌱 A detailed step by step tutorial can be found here: [Get Started Documentation](https://cocoindex.io/docs/getting_started/quickstart) -Steps: -- Indexing Flow: - 1. We will ingest from a list of local files. - 2. For each file, perform chunking (Recursive Split) and then embeddings. - 3. We will save the embeddings and the metadata in Postgres with PGVector. +### Indexing Flow: +Screenshot 2025-05-19 at 5 48 28 PM -- Query: +1. We will ingest from a list of local files. +2. For each file, perform chunking (Recursive Split) and then embeddings. +3. We will save the embeddings and the metadata in Postgres with PGVector. + +### Query: 1. We will match against user-provided text by a SQL query, reusing the embedding operation in the indexing flow. -🌱 A detailed step by step tutorial can be found here: [Get Started Documentation](https://cocoindex.io/docs/getting_started/quickstart) - ## Prerequisite From 4e31b86d0c5d69c911bba6b5bcab0d564ef544a8 Mon Sep 17 00:00:00 2001 From: Linghua Jin Date: Mon, 19 May 2025 18:29:22 -0700 Subject: [PATCH 15/15] Update README.md --- examples/text_embedding/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/text_embedding/README.md b/examples/text_embedding/README.md index 809b2de7..32c91d1b 100644 --- a/examples/text_embedding/README.md +++ b/examples/text_embedding/README.md @@ -15,7 +15,7 @@ Steps: 3. We will save the embeddings and the metadata in Postgres with PGVector. - Query: -1. We will match against user-provided text by a SQL query, reusing the embedding operation in the indexing flow. +We will match against user-provided text by a SQL query, reusing the embedding operation in the indexing flow. 🌱 A detailed step by step tutorial can be found here: [Get Started Documentation](https://cocoindex.io/docs/getting_started/quickstart)