AI Folks
  • Courses
  • Web Of AI
  • Pricing
  • Enterprise
Log in
PreviousAnswers from your sources with NotebookLMNextWeb data with Firecrawl

Vibe Coder · Unit 17: RAG and Your Data · Lesson 3 of 6

File search: hosted RAG

The shortest way to put RAG inside your product: upload files to a vector store and let a hosted file search tool do the chunking, embedding and retrieval.

Read the short notes and pictures.Do everything inside a blue frame.

Rent the pipeline

The two phases of RAG, indexing and answering, are the same in almost every product. Model providers now offer them as a tool. OpenAI calls its version file search. It is the fastest way to give your product’s AI feature knowledge of your documents.

How it works

Vector store

A container at the provider that holds your files after they have been chunked and embedded.

File search tool

A hosted tool the model can use during a response. It searches your vector store by meaning and by keyword.

Citations

The response marks which file each part of the answer came from.

  1. 1

    Upload your files

    Through the provider’s dashboard or API.

  2. 2

    Add them to a vector store

    And wait until indexing is completed.

  3. 3

    Enable the tool in your model call

    Naming the vector store to search.

  4. 4

    Show the citations

    In your app, beside the answer.

Pale tiles, hand-drawn. A code window showing a model call with a file search tool and a vector store id.
Enabling file search is one entry in the list of tools.

Without your documents

response = client.responses.create(
    model="...",
    input="What is our refund window?",
)

With file search

response = client.responses.create(
    model="...",
    input="What is our refund window?",
    tools=[{
        "type": "file_search",
        "vector_store_ids": ["<vector_store_id>"],
    }],
)
This is the shape in OpenAI’s documentation for the Responses API. Use a current model name from their docs. You can also limit the number of results and filter by file attributes.

No code? Same idea

You do not have to write this call yourself. Ask your app builder or coding agent to "answer using the OpenAI file search tool with this vector store", or use the vector store and agent nodes in n8n. The concept is what you need to recognise.

Using it from the low-code path

  1. 1

    Create the vector store in the dashboard

    Upload your cleaned source folder.

  2. 2

    Call it from an n8n webhook workflow

    Webhook in, model call with file search, Respond to Webhook out.

  3. 3

    Call that webhook from your app

    A "help" box sends the question and shows the answer and its sources.

  4. 4

    Re-upload when documents change

    Or build a small workflow that does it.

The trade

Pale tiles, hand-drawn. Two cards compare hosted file search with your own pipeline.
Hosted is fast. Your own pipeline gives control.

Hosted retrieval is right for most first versions. Its limits are real, though: your files sit with the provider, you cannot see or tune how they are chunked, and the feature ties you to that provider’s models. The next two lessons show the other route, with your own data in your own database.

Per-user data needs care

A single shared vector store is fine for public help content. It is the wrong place for material that only some users may see. For that you need separate stores, metadata filters, or the database approach with access rules in the vectors lesson.

ActivityYour turnWrite it yourself first, then compare.

Your help box works, but answers do not show where they came from. Why does that matter, and what do you add?

ActivityBuild stepA helper that answers from your documents

Add a help box that answers from your documents

Create a vector store from your cleaned source folder. Add a help feature to your product that sends a question to the model with file search enabled and shows the answer with its sources. Run your ten test questions through it.

Done when

Save the results table. You will compare it with your own pipeline later.

Keep these

  • Hosted file search does chunking, embedding and retrieval for you.
  • Upload files to a vector store and enable the tool in the model call.
  • Show the citations, and keep private data out of shared stores.
Previous lessonAnswers from your sources with NotebookLMNext lessonWeb data with Firecrawl