Automating Data Ingestion with a RAG Flywheel
Zalando's Supply Operations automates mapping of diverse supplier spreadsheet headers (10-60 columns) onto a 55+ column internal schema using an LLM-driven RAG flywheel that learns from human-approved mappings. Generation runs on AWS Bedrock at temperature 0 with forced tool calling, and the API stays the decision boundary: it rejects unknown source or target columns and invalid confidence scores, and it enforces full coverage and stable ordering. Cold-start uploads rely on zero-shot deduction. Warm starts embed each column as name, type and sample values with Titan V2 (1024 dimensions), then query pgvector with an HNSW index for the top 3 matches above 0.8 cosine similarity, ranked by approval count to resist drift, and inject them as historical context.
Related posts
- Building Data-Aware AI Applications with Heroku AI and LlamaIndex
Heroku Engineering mediumAdeptA RAG stack on Heroku pairs LlamaIndex for ingestion, indexing and retrieval with Heroku Managed Inference (Claude 4 Sonnet via an OpenAI-compatible API), Cohere Embed Multilingual for embeddings, and Heroku Postgres with pgvector as the vector store. The walkthrough provisions the add-ons via the Heroku CLI. It then shows Python code that points LlamaIndex's OpenAILikeEmbedding at Heroku's embedding endpoint, stores 1024-dimension vectors in PGVectorStore, and queries documents through a query engine. Example use cases include financial report analysis, insurance claim agents and support chatbots.
- Building a RAG pipeline for Google Analytics with ClickHouse and Amazon Bedrock
ClickHouse mediumAdept
A natural language interface over raw Google Analytics data stored in ClickHouse is built as a multi-step RAG pipeline that generates SQL from user questions using Amazon Bedrock models. Drawing on text-to-SQL research such as DAIL-SQL from the Spider benchmark, the design retrieves similar example questions and their SQL via vector embeddings, because concepts like "returning users" cannot be inferred from the schema alone. Embeddings come from a Python executable-pool UDF calling Titan embeddings, with retries and backoff for Bedrock quotas, and are invoked at query or insert time. ClickHouse serves as both the vector store and the analytics database, and specific settings are given to parallelize embedding generation on small tables.
- Building a RAG application with Llama 3.1 and pgvector
Neon mediumAdept
A small RAG pipeline built on Neon Postgres with pgvector as the vector store, OctoAI's gte-large embedding model producing 1024-dimensional vectors, and Llama 3.1 405B generating answers. The walkthrough enables the vector extension, creates a table with a VECTOR(1024) column, and embeds and inserts a CSV of fake quotes from Python via psycopg2. At query time it embeds the user input, retrieves the two nearest quotes with a cosine-distance ORDER BY ... LIMIT 2 query, and injects them into the system prompt. Embedding dimension directly drives storage cost, e.g. 1024 for gte-large versus up to 3072 for OpenAI's model.
- Inside OpenAI’s in-house data agent
OpenAI mediumAdept
OpenAI built an internal GPT-5.2-powered data agent that answers natural-language analytics questions over a platform of 600+ PB and 70k datasets, available via Slack, web, IDEs, Codex CLI and ChatGPT through MCP. Its accuracy rests on six layers of context: table usage and lineage, human annotations, Codex-derived code-level table definitions, institutional knowledge from Slack/Docs/Notion, a user-correctable memory, and live warehouse queries. A daily offline pipeline normalizes and embeds this context for RAG retrieval, keeping latency predictable across tens of thousands of tables. Quality is protected with Evals API test sets that compare generated SQL output against golden queries.
- ChatGPT plugins now support Postgres & Supabase
Supabase mediumAdeptSupabase contributed Postgres and Supabase datastore providers to OpenAI's ChatGPT Retrieval Plugin, storing text-embedding-ada-002 embeddings in pgvector. The Postgres provider connects directly via psycopg2, while the Supabase provider goes through PostgREST to enable Row Level Security. Both share the same documents schema and use a plpgsql match function that filters by source, author and date and ranks results by inner product distance. A walkthrough ingests the PostgreSQL 15 docs (about 7,904 chunks), adds an approximate ivfflat index with lists ≈ rows/1000, and registers the local plugin with ChatGPT to answer documentation questions.