Skip to content
    Hestur AI

    RAG Systems

    How to Add a Knowledge Base to ChatGPT (or Any LLM)

    Adding a knowledge base to ChatGPT or any LLM means building a RAG pipeline: chunk your documents, embed them, store them in a vector database, then retrieve.

    / 2 min read /

    How to Add a Knowledge Base to ChatGPT (or Any LLM)

    Adding a knowledge base to ChatGPT or any LLM requires building a RAG (retrieval-augmented generation) pipeline. Your documents are chunked, embedded into vectors, stored in a vector database, and retrieved at query time — grounding the model’s answers in your specific content rather than its general training data. With managed tools, a basic setup takes a few hours. Production accuracy with your real data takes 2–6 weeks.

    Option 1: OpenAI Assistants API (fastest path)

    OpenAI’s Assistants API includes file upload and retrieval built in. You upload your documents, and the API handles chunking, embedding, and retrieval automatically.

    How to set it up:

    1. 01Upload your documents via the API or OpenAI dashboard (supports PDF, DOCX, TXT, JSON, and more)
    2. 02Create an assistant with retrieval tool enabled
    3. 03Create a thread, add the user’s message, run the assistant
    4. 04The assistant automatically retrieves relevant file content before answering

    Pros: No vector database to manage, no embedding pipeline to build, fastest setup

    Cons: Limited control over chunking strategy, can’t use your own embedding model, no hybrid search, OpenAI vendor lock-in, limited document update mechanisms

    Best for: Prototypes and internal tools where you want something running quickly with minimal engineering.

    Option 2: Custom RAG pipeline (production path)

    For production use, a custom RAG pipeline gives you control over accuracy, cost, and architecture.

    Step 1: Choose your vector database

    DatabaseBest forGetting started
    ———
    PineconeFast setup, managedpip install pinecone-client
    WeaviateHybrid search, self-host optionpip install weaviate-client
    QdrantLarge index, self-hostedpip install qdrant-client
    pgvectorAlready on PostgresCREATE EXTENSION vector;

    Step 2: Ingest your documents

    Pick one job.
    Try it for four weeks.

    In a free 30 minute workflow review we look at how the job runs today, what the AI would take on and what a person would still check. If it is not a fit, we say so.

    Book a free 30 minute workflow review

    No commitment / 30 minute call / fixed scope before any work starts