> For the complete documentation index, see [llms.txt](https://docs.layerlens.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.layerlens.ai/more-in-this-section-1/top-5-starter-recipes.md).

# Top 5 starter recipes

The cookbook has 59 recipes. These are the five we'd hand to a new engineer on their first week — one per workflow stage, each delivering visible value in under an hour.

Run [first-eval-5-minutes](/more-in-this-section-1/first-eval-5-minutes.md) first if you haven't. These five build on top.

## 1 — Instrument your own Python pipeline

**Why this one:** before you can score real production traffic, you need traces. This recipe shows the two primitives — `@trace` and `span()` — that turn any Python function into something Stratix can see. It works whether you're calling OpenAI, a local model, a vector store, or your own custom orchestration. Five lines of decorators replace days of OTel wiring.

**Stage:** Build · **Time:** 15 min · **Output:** traces flowing into Premium → Traces

→ [Recipe: instrument a custom Python pipeline](/6.-build-wire-your-code/instrument-custom-python.md)

## 2 — Backfill traces from existing logs

**Why this one:** you almost certainly already have logs — Postgres rows, JSONL files, Datadog exports — sitting somewhere. This recipe converts that history into Stratix traces in bulk so you can run evaluations against weeks or months of real production data on day one, instead of waiting for new traffic to accumulate. Highest leverage move you can make in week one.

**Stage:** Observe · **Time:** 30 min · **Output:** historical traces visible in Premium, ready to score

→ [Recipe: backfill from existing logs](/7.-observe-see-whats-happening/backfill-from-logs.md)

## 3 — Catch hallucinations

**Why this one:** hallucination is the #1 failure mode every team asks about first. This recipe wires up an LLM-backed faithfulness judge that flags answers unsupported by retrieved context. Works on freshly captured traces or backfilled history. The judge prompt is tunable, the threshold is tunable, and the per-row verdicts are inspectable — so you can trust the signal before you act on it.

**Stage:** Evaluate · **Time:** 20 min · **Output:** every trace gets a faithfulness score and verdict

→ [Recipe: catch hallucinations](/more-in-this-section-6/catch-hallucinations.md)

## 4 — Validate structured outputs with a JSON Schema code grader

**Why this one:** the moment your agent emits JSON, you need to guarantee the shape — required fields, types, enum values, nested structures. This recipe registers a **code grader** that runs a JSON Schema check against every output and emits a 0/1 pass score. Pairs naturally with #3: hallucination judges score *content*, schema graders score *shape*. Together they catch \~80% of the "my agent is broken" reports in CI.

**Stage:** Evaluate · **Time:** 15 min · **Output:** schema failures surface as failing rows in every evaluation

→ [Recipe: validate JSON output with schema](/more-in-this-section-6/json-schema-validate.md)

## 5 — Optimize a judge with GEPA basics

**Why this one:** the judges you bootstrap (recipe #3) start at 60–75% agreement with human labels. That's enough to *find* problems but not enough to *gate* on. GEPA — the platform's prompt-optimization loop — tunes the judge prompt against a small labeled set until agreement climbs past 90%. This recipe takes 30 minutes and converts a noisy first-draft judge into one you trust enough to wire into CI.

**Stage:** Improve · **Time:** 30 min · **Output:** an optimized judge with measurable agreement gain

→ [Recipe: GEPA basics](/9.-improve-tune-the-system/gepa-basics.md)

## How these five fit together

```
1. Instrument → traces exist
2. Backfill → historical traces exist
3. Faithfulness judge → content quality scored
4. JSON schema grader → output shape scored
5. GEPA basics → judges sharpened
```

In one week, you go from "we have a chatbot" to "we have measured quality across thousands of past interactions, with judges we trust enough to block bad releases on."

## Where to next

* **More recipes by problem, framework, industry, integration:** [All cookbook recipes](/2.-get-started/all-cookbook-recipes.md)
* **Guided learning paths instead:** [All tutorials](/2.-get-started/all-tutorials.md)
* **Task-shaped walkthroughs:** [All guides](/2.-get-started/all-guides.md)
* **Workflow context:** [The Stratix workflow](/1.-introduction/the-stratix-workflow.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.layerlens.ai/more-in-this-section-1/top-5-starter-recipes.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
