Setting the file. One moment.
Subchapter 1.2
references/context.mdMarkdown1 KBView on GitHub
Get raw context snippets from an assistant’s knowledge base without generating a full chat response. Useful for debugging, custom RAG workflows, or quick lookups.
--assistant (required): Assistant name--query (required): Search query text--top-k (optional): Number of snippets — default 5, max 16--snippet-size (optional): Max tokens per snippet — default 2048--json (optional flag): JSON outputuv run scripts/context.py \
--assistant "assistant-name" \
--query "search text" \
--top-k 5Use context when: you want raw snippets, are debugging knowledge, need source material, or are building custom workflows. Use chat when: you want synthesized answers, citations in a conversational response, or multi-turn Q&A.
No results — try broader search terms; suggest uploading more documents.
context method not available — update SDK: pip install --upgrade pinecone (requires v8.0.0+).
Assistant not found — check name for typos, run list command.