Related use case: Backend for AI Apps
Concept Mapping
| Your Database Stack | Pixeltable Equivalent |
|---|---|
| Postgres / MySQL for metadata | pxt.create_table() with typed columns |
| Pinecone / Weaviate / Chroma for embeddings | add_embedding_index() — built-in HNSW search |
| S3 for media files (referenced by URL) | pxt.Image, pxt.Video, pxt.Document native types |
| ORM (SQLAlchemy, Prisma) | .select(), .where(), .order_by() |
LangChain DocumentLoader | insert(), import_csv(), import from S3 |
RecursiveCharacterTextSplitter | document_splitter iterator via create_view() |
retriever.get_relevant_documents() | .similarity() + .order_by() |
create_retrieval_chain() | Computed column with LLM call |
| Keeping Postgres and Pinecone in sync | Automatic — derived columns can’t go stale |
Side by Side: RAG Pipeline
Load documents, chunk, embed, retrieve, and generate answers.- LangChain + Pinecone
- Pixeltable
langchain, langchain-openai, langchain-pinecone, pinecone-client, sqlalchemyWhat Changes
| LangChain + Pinecone | Pixeltable | |
|---|---|---|
| New documents | Re-run chunking, embedding, and Pinecone upsert | docs.insert([...]) — chunks, embeddings, and index update automatically |
| Infrastructure | Postgres + Pinecone account + API keys | Single local system, no external services |
| Sync issues | Postgres metadata and Pinecone vectors can drift | Impossible — derived columns are always consistent |
| Intermediate results | Ephemeral unless you add logging | Every column is stored and queryable: qa.select(qa.context).collect() |
| Versioning | Not built-in | t.history(), pxt.create_snapshot() |
| Swap providers | Rewrite chain with new provider classes | Change the model string — same pipeline |
Common Patterns
Adding new documents
- LangChain + Pinecone
- Pixeltable
Filtering by metadata
- Pinecone
- Pixeltable
Inspecting what was retrieved
- LangChain
- Pixeltable
Next Steps
Backend for AI Apps
Full use case walkthrough
RAG Pipeline
Complete RAG system with chunking and retrieval
Chunk Documents
Control chunk size, overlap, and splitting strategies
Semantic Search
Search patterns and similarity queries