← Back
Towards Data Science

Context Engineering for RAG : The Four Typed Inputs Behind Every RAG Answer

#rag#llm
Context Engineering for RAG : The Four Typed Inputs Behind Every RAG Answer
Level:Intermediate
For:ML Engineers
TL;DR

The practice of Context Engineering for Retrieval-Augmented Generation (RAG) involves four typed inputs that converge on a single Large Language Model (LLM) call. This approach, named by Tobi Lütke and Andrej Karpathy in 2025, enables effective document intelligence. For a single document, each component emits typed pieces that are used to generate a response. The practical implication for engineers building AI systems is the ability to create more accurate and informative outputs by leveraging these typed inputs.

⚡ Key Takeaways

  • The four typed inputs are used behind every RAG answer, although their specific types are not mentioned.
  • Context Engineering is a practice that involves emitting typed pieces from each component for a single document.
  • The approach converges on one LLM call, highlighting the importance of LLMs in RAG.
  • Corpus, conversation, and tool extensions are potential follow-up work for Context Engineering.
💡 Why It Matters

The Context Engineering practice has a significant impact on engineers shipping production AI today, as it enables the creation of more accurate and informative outputs. By understanding the four typed inputs behind every RAG answer, engineers can design more effective RAG systems.

✅ Practical Steps

  1. Apply the concepts from this article to your own system design, considering the role of typed inputs in RAG.

Want the full story? Read the original article.

Read on Towards Data Science

More like this

Safely Releasing Frontier Models to Customers

AWS ML Blog#amazon

Morgan Stanley cut its riskiest reconciliation job in half — by making its agents less autonomous

VentureBeat AI#agents

NVIDIA BioNeMo Agent Toolkit Brings Accelerated AI to Life Sciences Researchers in Claude Science

NVIDIA Blog#agents

3 Questions: Beyond data-driven aesthetics

MIT News AI#llm

EXPLORE AI NEWS

Daily hand-picked stories on LLMs, RAG, agents and production AI — curated for engineers who ship.

BROWSE NEWS

GET THE WEEKLY DIGEST

Join engineers getting the Monday signal-over-noise AI breakdown. No spam, unsubscribe anytime.

LEARN AI ENGINEERING

Curated courses, research papers, repos and tutorials built for engineers leveling up in AI.

START LEARNING