Examples
31 articles
Worked examples and implementation guides for CocoIndex.
Turn Discord support threads into an FAQ for agents
Build FAQ.md from a Discord support forum with CocoIndex and an LLM: one current answer per question, merged across threads, updated only where threads change.
Codebase Indexing for AI Agents with CocoIndex
Index a codebase for RAG and AI coding agents with CocoIndex V1 and Tree-sitter: language-aware chunking, embedding, and a live vector index in async Python.
Stream CSV changes to Kafka: publish only changed rows
Watch a folder of CSV files and publish each changed row as JSON to a Kafka topic with CocoIndex, with no producer loop.
Build a Knowledge Graph from YouTube Podcasts with an LLM
Build a pipeline that turns YouTube podcasts into a knowledge graph: extract speakers, statements, and entities with an LLM, then dedupe them with embeddings.
Hybrid search over SEC EDGAR filings with Apache Doris
Index SEC 10-K text and XBRL facts into one Apache Doris table with CocoIndex v1, then rank each chunk by meaning and by keywords, fused with RRF.
Generate Codebase Documentation with an LLM, Kept Current
Generate a Markdown wiki page for every Python project in a folder with an LLM and CocoIndex v1. On each run, the LLM re-reads only the files that changed.
Turn PDF Slides into Narrated Audio with Gemini and TTS
Build a CocoIndex v1 pipeline that turns PDF slides into vision-generated speaker notes, local Pocket TTS narration, and searchable LanceDB records.
Extract Patient Intake Forms with DSPy and CocoIndex
Extract Pydantic-typed patient records from PDF intake forms with DSPy and Gemini vision into Postgres with pgvector, and see which edits re-run extraction.
Build a Knowledge Graph from Meeting Notes with Neo4j
Build a self-updating Neo4j knowledge graph from meeting notes with CocoIndex v1: LLM-extracted decisions, tasks, and owners, with embedding-based dedupe.
Normalize and rank Hacker News topics with an LLM
Normalize free-text topics with an LLM prompt and rank them with a weighted SQL score in Postgres, in an incremental CocoIndex v1 pipeline over Hacker News.
Turn a polling API into an incremental source: Hacker News
Turn a polling API into an incremental CocoIndex v1 source in plain Python, using Hacker News: list keys, fetch by key, own rows, survive failed fetches.
Extracting Intake Forms with BAML and CocoIndex
Use BAML and CocoIndex v1 to extract typed patient records from PDF intake forms into Postgres with pgvector, and avoid the role("user") PDF gotcha on OpenAI.
Multimodal PDF Search: Embed Text and Images with CLIP
Split PDFs into text chunks and images, embed text with SentenceTransformers and images with CLIP, and search both in Qdrant with the page number on every hit.
Extract Invoice Data from PDFs into Snowflake with an LLM
Extract supplier invoices from PDFs in Azure Blob Storage into a typed Snowflake table with an LLM and CocoIndex, processing only new or changed files.
Trace search results back to source data
Define query handlers in CocoIndex and trace search results back to source data in CocoInsight to close the loop on indexing strategy.
Add Semantic Search to a Postgres Table with pgvector
Use an existing PostgreSQL table as a CocoIndex source: derive fields, embed each row, and store the vectors in Postgres with pgvector, incrementally.
Search PDFs and Images Without OCR Using ColPali and Qdrant
Index PDFs and images into one Qdrant collection with CocoIndex v1 and ColPali multi-vector embeddings. Each page is embedded as an image, so no OCR is needed.
Multi-vector image search with ColPali and Qdrant
Index images with ColPali multi-vector patch embeddings and a Qdrant MaxSim collection using CocoIndex v1: incremental, live, in plain async Python.
Write a Custom Target: Export Indexed Data Anywhere
Export CocoIndex data anywhere: implement a TargetHandler with a tracking record and an action sink; the engine handles diffing, syncing, and cleanup.
Search your photos by face with CocoIndex
Detect every face in a photo folder, embed each with dlib, and index one Qdrant point per face with CocoIndex v1, so a face finds the photos it appears in.
Extract Metadata from Research Paper PDFs with an LLM
Index academic papers with CocoIndex: read the first page of each PDF, extract title, authors, and abstract with an LLM, and embed them for semantic search.
CocoIndex + Kuzu: Real-time knowledge graph with Kuzu
Build a real-time knowledge graph with Kuzu as a native CocoIndex target: incremental updates, high-performance graph queries.
Incremental ETL from Amazon S3 to Postgres pgvector
Index Markdown from Amazon S3 into Postgres pgvector with CocoIndex v1. A re-run reads only the objects that changed and embeds only the chunks with new text.
Build Text-to-Image Search with CLIP and Qdrant
Build live image search with CocoIndex v1, CLIP, FastAPI, and Qdrant. Embed photos and text in one vector space and search by meaning.
What Are Text Embeddings? Build Semantic Search in Python
Text embeddings 101: what an embedding is, how similarity works, why you chunk, and how to build a semantic search index with CocoIndex v1 and pgvector.
Build a Product Recommendation Engine with an LLM and Neo4j
An LLM extracts each product's taxonomy and complementary taxonomy; CocoIndex turns the labels into a Neo4j knowledge graph that answers 'bought this, also need…'.
Build a Knowledge Graph from Documents with an LLM and Neo4j
Build a Neo4j knowledge graph from Markdown docs with an LLM and CocoIndex v1. An edit re-extracts only that file, and unsupported nodes and edges are deleted.
Extract Patient Intake Forms from PDF and DOCX with an LLM
Extract typed Patient records from PDF and DOCX intake forms with an LLM and CocoIndex v1, and compare the plain, BAML, DSPy and local-model approaches.
Semantic Search over Google Drive Files with pgvector
Index the documents in a shared Google Drive folder as text embeddings in Postgres with CocoIndex v1, then search them by meaning instead of by filename.
Build Real-Time Codebase Indexing for AI Code Generation
Indexing codebase for RAG with CocoIndex and Tree-sitter in real-time: chunking, embedding, semantic search, and build vector index for efficient retrieval.
Extract Structured Data from PDFs Locally with Ollama
Turn PDFs into typed Postgres rows on your own hardware: docling converts each PDF to Markdown, a local Ollama model fills a nested schema.