PromptisePromptise
PlatformSoonEnterprise
DocsGitHub
Talk to usGet started
Promptise - AI Framework LogoPromptise

The full-stack framework for agentic systems. Build with the framework. Run it on the platform. Launch it with our engineers.

pip install promptise

[01] Product

  • Framework
  • Platform (coming soon)
  • Enterprise
  • How it works
  • Contact

[02] Framework

  • The Agent
  • The Interface
  • The Harness

[03] Resources

  • Documentation
  • GitHub
  • Why Promptise
  • Use cases
  • Roadmap
  • Guides
  • Learning Paths
  • Questions

[04] Company

  • About
  • Terms of Service
  • Privacy Policy
  • Cookie Policy
  • Subprocessors

© 2026 Promptise by Manser Ventures. All rights reserved.

hello@promptise.com
← Guides> Library> Topic

Context engineering: managing what the model sees

A model answers from what is in its context window on that call and nothing else. Context engineering is the work of choosing that content: the instructions, the conversation so far, retrieved documents, tool results and memory, all within a token limit.

More context is not always better. Long prompts cost more and run slower, and models tend to use information at the start and end of a long input better than material in the middle, an effect known as lost in the middle. The guides here cover managing the context window in AI agents, where to place documents and questions in long prompts, compressing prompts with tools such as LLMLingua, grounding answers in supplied text, and the agent harness that assembles context on each turn.

12
guides
3
Beginner
7
Intermediate
2
Advanced
3 h
of reading

Start here

AI Custom Instructions for Work: Stop Re-Explaining

AI custom instructions, projects and memory in ChatGPT, Claude, Gemini and Copilot: what goes where, templates and real output, so you stop re-explaining.

Beginner · 12 minRead the guide →

11 guides

  1. 01Long-Running AI Tasks: Write a Brief That Lasts HoursHow to brief an AI agent for a long-running task: a done list, milestones, a progress log, stop rules and handoff notes, with real prompts and a template.Beginner · 13 minMemory, context and RAGBeginner · 13 minMemory, context and RAG→
  2. 02Grounding LLM Answers: Give the Model the Right ContextGround LLM answers in your own text: paste the source, fence it with delimiters, require citations and handle gaps. Real return-policy example.Beginner · 7 minPrompt EngineeringBeginner · 7 minPrompt Engineering→
  3. 03Tool Result Too Large? Keep an AI Agent's Context SmallTool result too large for your AI agent? Page, filter and count at the tool, return errors instead of rows, and see what each design costs in tokens.Intermediate · 16 minMemory, context and RAGIntermediate · 16 minMemory, context and RAG→
  4. 04Vectorless RAG: Tree Search Over Long DocumentsVectorless RAG explained: how tree search over a document outline replaces vector search, when it beats embeddings and when not, with a runnable agent.Intermediate · 18 minMemory, context and RAGIntermediate · 18 minMemory, context and RAG→
  5. 05Agent Skills vs MCP Tools: When to Use EachAgent Skills vs MCP tools: what SKILL.md skills and MCP servers are, how each uses context and permissions, when to use which, and an agent using both.Intermediate · 16 minTools and the Model Context Protocol (MCP)Intermediate · 16 minTools and the Model Context Protocol (MCP)→
  6. 06What Is an Agent Harness? Parts and How to Build OneWhat an agent harness is and how to build one: the tool loop, context compaction, token budgets, loop guards and verification, with runnable code.Intermediate · 18 minBuilding AI agents in PythonIntermediate · 18 minBuilding AI agents in Python→
  7. 07Context Engineering for AI Agents: Context Window ManagementContext engineering for AI agents: decide what the model sees on each step, return less from tools, and keep long runs small without losing the question.Intermediate · 26 minTools and the Model Context Protocol (MCP)Intermediate · 26 minTools and the Model Context Protocol (MCP)→
  8. 08How Context Shapes LLM Output: The Model Continues ItWhy LLMs copy the patterns in your context, flaws included: next-token prediction, Codex and multi-turn research, a real example and three fixes.Intermediate · 4 minPrompt EngineeringIntermediate · 4 minPrompt Engineering→
  9. 09Long-Context Prompting: Placement, Structure and RAGLong-context prompting tactics: where to put documents and the question, how to tag sources, quote-then-answer, and when to retrieve instead of stuffing.Intermediate · 8 minPrompt EngineeringIntermediate · 8 minPrompt Engineering→
  10. 10Context Compaction for AI Agents: Trim vs SummarizeContext compaction for AI agents: drop, trim or summarize, what each keeps on a real transcript, why agents forget file paths, and how to compact safely.Advanced · 20 minMemory, context and RAGAdvanced · 20 minMemory, context and RAG→
  11. 11Prompt Compression: LLMLingua and Lost in the MiddlePrompt compression techniques compared: selection, LLMLingua, summaries. Fix lost in the middle with reordering. Real example: 15,900 tokens cut to 1,400.Advanced · 9 minCost control and rate limitsAdvanced · 9 minCost control and rate limits→

Related topics

  • Cost Control29
  • RAG (Retrieval-Augmented Generation)12
  • Model Context Protocol (MCP)54
  • Prompt Writing Basics16
  • Tool Calling34
  • AI at Work20
  • Grounding and Citations9
  • Agent Harness5

Topic hubs

  • Memory, context and RAG→
  • Tools and the Model Context Protocol (MCP)→
  • Cost control and rate limits→
  • AI at work→

By category and level

  • AI Engineering guides147
  • Prompt Engineering guides54
  • AI at Work guides18
  • Beginner guides75
  • Intermediate guides140
  • Advanced guides38

Search every guide.

The library lists all guides with filters for topic, level, category and reading time.

All guidesLearning paths