L8 - Context Construction & Prompting¶
L8 covers system prompts, prompt templates, few-shot examples, context packing, instruction hierarchy, prompt evaluation, and runtime context assembly. It is where a task becomes a model-facing conversation or request.
L8Context Construction & Prompting
- Instructions
- Examples
- Context packing
- Prompt tests
What belongs here¶
L8 sits above inference and below retrieval, tool calls, and planning. It describes how the system shapes the immediate input to a model, including instructions, examples, retrieved snippets, tool schemas, and conversation state.
Representative projects¶
| Project | Why it might fit | Adjacent layers |
|---|---|---|
| LangChain prompt templates | Common abstraction for constructing model inputs from variables and templates. | L8 prompting, L12 orchestration |
| LlamaIndex | Data and context orchestration tooling that often constructs prompts from indexed knowledge. | L8 context, L9 retrieval |
| DSPy | Programming model for optimizing prompts and language model pipelines. | L8 prompting, L12 planning |
| promptfoo | Evaluation and testing workflows for prompts and model behavior. | L8 prompting, L15 governance |
| Guidance | Structured generation and prompting library for controlling model output. | L8 prompting, L15 schema |
| Microsoft Prompt Flow | Tooling for prompt and LLM workflow development and evaluation. | L8 prompting, L12 orchestration |
| DollhouseMCP personas and skills | Public Dollhouse Research examples where reusable personas, skills, and activation patterns shape model-facing context. | L8 context, L16 product UX |
| Elemental Surveys | Applied research workflow where framing, instructions, and context assembly are part of the visible product behavior. | L8 context, L12 planning |
Boundary questions¶
- If retrieved content is assembled into a prompt, is the system doing L8 work, L9 work, or both?
- Do tool schemas included in a prompt belong to L8 context or L10 tool invocation?
- Should prompt testing be L8 quality assurance or L15 governance?
Signals to watch¶
- Prompt construction shifting from hand-written templates to optimized programs.
- More explicit instruction hierarchy and context provenance.
- Evaluations becoming part of every prompt change.