Skip to main content

RAG in one folder and one Task

Alex MacLeod

Alex uploads three AI governance documents to a memory folder, turns on Searchable by AI, and has a working retrieval layer before writing any code. The Task that exposes it to Claude is a search call and a payload. Ten minutes later Claude is comparing how NIST and the EU classify AI risk, using those documents as its source.

What's covered

  • Enabling Searchable by AI on a memory folder and uploading governance documents from the EU, the White House, and NIST
  • The PDF content view and the Chunks tab, which show what got embedded and what a query is matched against
  • A Task that runs qbash.memories.vector_search against the folder, builds a payload from the hits, and returns it
  • Exposing that Task as an MCP tool and adding it to Claude as a connector
  • Claude running several searches to answer "How do the NIST framework and the EU AI Act differ in how they classify AI risk levels?"
  • Dropping new files into the folder and having them indexed for the next query

Chunking, embedding, and index maintenance belong to the folder, so the Task only decides what to search and which fields to hand back:

question = qbash.inputs.get("question")

hits = qbash.memories.vector_search(
    query=question,
    folder="AI Governance",
    limit=5,
)

qbash.output([
    {"source": h["name"], "content": h["content"], "score": h["similarity"]}
    for h in hits
])

A keyword search would not get far on the demo question, since the two documents were written independently and describe risk in their own terms. Claude searches more than once, rephrasing as it goes, then assembles the comparison from what comes back. The similarity scores travel with each hit, so the answer can be traced to the chunks that produced it.

Because the Task is reachable over MCP, the same folder answers from Claude Code, ChatGPT, Cursor, or anything else that speaks the protocol. Each client connects to the Task, so editing the retrieval logic later updates all of them at once.

Full walkthrough in the docs: Building a RAG knowledge base and Execution MCP Server.

Open qbash →

Stay in the loop

Product updates, tutorials, and AI insights. No spam.