Budgeting the context window
Your model has a 128,000-token context window. The system prompt uses 2,000 tokens, tool definitions 6,000, chat history 30,000, and you reserve 4,000 for the answer. How many 800-token retrieved chunks fit at most?
Discussion 0
Join free to post in the discussion.
Related questions
- What RAG doesAI Engineer (LLM & Generative AI)
- What a vector database doesAI Engineer (LLM & Generative AI)
- Does the reply use context spaceAI Engineer (LLM & Generative AI)
- Checking prompt size in advanceAI Engineer (LLM & Generative AI)
- What semantic search adds over keywordsAI Engineer (LLM & Generative AI)
- What an embedding dimension isAI Engineer (LLM & Generative AI)
- What top-k means in retrievalAI Engineer (LLM & Generative AI)
- Why vector search is approximateAI Engineer (LLM & Generative AI)