Skip to main content
Context is OpenLIT’s answer to RAG context management: a place to store reusable content for your RAG pipelines and AI applications, and have it returned automatically at runtime instead of hardcoding lookup logic in your application code. A context is simply a named, versionable piece of markdown - a system prompt, a knowledge snippet, a policy document, or any other reusable text - that you write once in OpenLIT and link to one or more rules in the Rule Engine. When a linked rule matches at runtime (for example, model equals gpt-4 and user_tier equals premium), the evaluate API returns that context’s content alongside the match, ready to inject into your prompt or pipeline.

What you get

Manage Contexts

Create, edit, and delete contexts - name, description, markdown content, status, tags, and meta properties

Link Rules

Connect a context to one or more Rule Engine rules, from either the context or the rule side

Retrieve Context

Call the evaluate API at runtime to fetch matching context content for your application

Why Context

Most prompt-management tools stop at versioning and deploying prompts. OpenLIT’s Context goes a step further: paired with the Rule Engine, it lets you store reusable knowledge snippets or system-prompt fragments once, and have your application fetch the right one automatically based on runtime conditions - like the model in use or a user’s plan tier - rather than writing that branching logic yourself. This combination of a reusable content store plus a conditional rule engine has no direct equivalent in comparable open-source LLM observability tools.

Frequently asked questions

Context stores reusable markdown content - system prompts, knowledge snippets, policy text, or any other text your AI application needs - so you can write it once and reuse it across rules instead of duplicating it in code.
Prompt Hub is for versioning and deploying structured prompts with variables. Context is a simpler, freeform markdown store meant to be paired with the Rule Engine so the right content is returned automatically based on runtime conditions, rather than fetched by name.
A context can be created and edited on its own, but it only becomes retrievable at runtime once it’s linked to at least one Active rule in the Rule Engine.
No. There is no delete control on the context detail page. Contexts are deleted from the list page, using the delete icon on that context’s row.

Rule Engine

Create conditional rules to match inputs and retrieve linked contexts, prompts, and other resources

Prompt Hub

Version, deploy, and collaborate on prompts with centralized management and tracking

SDK Rule Engine

Use evaluate_rule() from Python, TypeScript, or Go with full parameter reference

API Reference: Evaluate

Full reference for the Rule Engine evaluate endpoint with request and response schemas