State is what Jev gets to see
In the first lesson, the state was one review string. Real features often need more context. A document-relevance judgment may need both the reader's goal and the candidate passage.
state: the text or structured, text-bearing data Jev evaluates when answering your questions. State can be a string, object, or array. It is not the entire database and it is not hidden background knowledge you hope the model will supply. If a fact matters, the application must include it in a clear form.
Change the evidence, change the judgment
Compare the same bounded question with relevant, incomplete, and noisy state.
TrailCam MiniLove the camera. The battery drops to 20% by lunch.- native answer type
- noul
- synthetic noul
- 0.93
The complete review includes the decisive battery sentence, so the question is grounded in the supplied evidence.
Rule: Jev judges only the state your application supplies. A plausible typed answer is not proof that retrieval was complete.
Trace this example from input to result
Customer choice
A reader wants material that teaches database indexing from first principles.
Request or event
The application evaluates one candidate passage against the reader's goal.
Backend behavior
It builds state with named goal and passage fields, then sends that state to Jev.
Customer sees
Relevant passages rise in the reading list.
Diagnostic reasoning
Compare the source records with the final state and look for missing, mislabeled, or distracting fields.
Name relationships and missing facts
One short string is perfect when it contains everything needed. Use an object when the judgment depends on several roles or relationships. Field names help distinguish a query from a candidate, or a user's words from an application's observation.
const state = {
readerGoal: "Learn how database indexes speed up lookups",
candidate: {
title: "B-tree indexes for beginners",
passage: "An index stores ordered keys so a database can find rows...",
},
context: {
audience: "new backend engineers",
},
};
This shape lets a question say exactly what relationship to judge: "How relevant is candidate.passage to readerGoal for context.audience?" A single unlabeled blob could make it unclear which text is the goal and which is the candidate.
Missing is different from false. If audience was never collected, do not write audience: "general" merely to fill the field. Omit it or represent it as unknown according to your state contract. When a missing fact prevents a sound judgment, code can request it or route the item for review.
| Customer sees | Application does | Jev returns |
|---|---|---|
| Results matched to a learning goal | Supplies both the goal and candidate passage | A judgment over the supplied relationship |
| A request to choose an experience level | Detects that audience context is missing | No invented user profile |
| Only accessible documents | Filters with trusted permissions before evaluation | No permission check |
Prefer relevant state over abundant state
Adding more text does not automatically improve a judgment. A full account history, unrelated messages, or dozens of candidate documents can obscure the evidence that matters. Start with the smallest state a careful person would need to answer the question, then test additions with examples.
Never shorten state silently to make a request fit. If a length limit requires selection, use an explicit rule, record that selection occurred, and preserve the fields the question depends on. Silent truncation can remove the decisive sentence while leaving a request that looks valid.
Use code for exact transformations before building state. Code should compare dates, count rows, and resolve identifiers. If a semantic judgment needs the result, include a clear fact such as publishedWithin30Days: "yes" instead of asking Jev to calculate from timestamps.
A strong article receives a low relevance result
source title mentions indexes · final state contains only the article footerThe model never saw the title or explanatory passage. Repair the retrieval or state-building step before changing the question. Jev can only judge the state it receives.
Keep secrets and unrelated personal data out of state. The question "Is this passage relevant?" rarely needs an email address, access token, or full user record. Minimization also makes examples easier to inspect and reduces distracting context.
Make the state shape a small contract
Write down where each field comes from and what absence means. This can be a short TypeScript type plus comments rather than a large platform design.
type RelevanceState = {
readerGoal: string;
candidate: { title: string; passage: string };
context?: { audience?: string };
};
function buildRelevanceState(input: SearchInput): RelevanceState {
return {
readerGoal: input.goal.trim(),
candidate: {
title: input.document.title,
passage: selectCandidatePassage(input.document),
},
context: input.audience ? { audience: input.audience } : undefined,
};
}
This function creates a reviewable boundary. If results change, ask whether the source changed, passage selection changed, or the same state received a different judgment.
Dig deeperShared state and several questions+
One request can evaluate several independent questions over the same state. For a review, you might ask whether it reports a problem and which product area fits best. The questions share evidence, but one answer does not become input to another. If an answer determines what evidence to fetch next, fetch it and make a later request.
Current Jev request limits and provider details belong to integration planning. The beginner habit is durable: keep state focused, name relationships, and verify that decisive evidence actually arrived.
Build useful state
Your answers stay in this browser. Write enough that another engineer could continue the investigation.