A feature store serves precomputed, versioned structured features, as in classic ML. Runtime context is the text, retrieved chunks, tool results and user history assembled into the prompt for each request in LLM apps.
Feature store: online and offline parity
Feature stores such as Feast, Tecton and the Databricks Feature Store keep two stores. An offline store holds training data and a low-latency online store serves inference. The model sees the same features at serving time that it saw in training, which gives train/serve consistency. A fraud model can read a precomputed fraud score for a user the moment a transaction arrives.
Think of a feature store as a materialized view or cache with strict versioning. The data is structured and reusable across models.
Runtime context and the token budget
Runtime context is built at the moment of inference. A retrieval and orchestration layer gathers RAG chunks, API results and user history. It has no offline training counterpart, and the model's token window caps it, so the context has to be curated to fit. It resembles building the payload for an API call.
In the fraud example, a feature store supplies the score. If the model also needs recent user interactions or external API data, runtime context compiles those into the prompt.
Why retrieval does not replace features
RAG does not replace a feature store. Numeric signals such as fraud scores, lifetime value or reusable embeddings belong in a store, precomputed. Recomputing them inside the prompt adds latency and invites inconsistency. A signal that several models share, such as lifetime value, is computed once and versioned, so every consumer reads the same value.
Relying only on runtime context also risks training-serving skew. The model trains on one set of inputs and serves predictions from another, which can degrade performance. Precomputed features keep both sides on the same data.
| Need | Use |
|---|---|
| Structured, reusable, latency-critical signals shared across models | Feature store |
| Unstructured knowledge, per-request facts, tool outputs | Runtime context |
| Both kinds of input | Pull features from the store and place them in the prompt as context |
Example scenario: 30% irrelevant responses from missing context
Suppose 30% of responses are irrelevant because runtime data is missing. A slow retrieval system or poorly assembled context feeds the model inconsistent, incomplete data and slows responses.
- Time the retrieval of context data and compare it with expected benchmarks.
- Log how consistent and complete the retrieved context is for a sample of requests.
- A/B test predictions that use feature store data against those that use runtime context.
A hybrid of both approaches may fix it. It adds data-management complexity but can improve accuracy and cut latency. Monitor accuracy and response time for each approach.