-
Notifications
You must be signed in to change notification settings - Fork 40
docs: document LLM event freshness behavior #406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -238,7 +238,14 @@ Native subscriber delivery is asynchronous. Flush subscribers before validating | |||||||||||||||||||||||
| printed output. In Node.js, also wait one event-loop tick after | ||||||||||||||||||||||||
| `flushSubscribers()` so JavaScript callbacks can run. | ||||||||||||||||||||||||
| - LLM start input contains the request after request intercepts and | ||||||||||||||||||||||||
| sanitize-request guardrails. | ||||||||||||||||||||||||
| sanitize-request guardrails. Annotations retain complete history while their | ||||||||||||||||||||||||
| agent session is fresh (initially and after compaction); later events contain | ||||||||||||||||||||||||
| the current user turn. With a request codec, the emitted event input uses the | ||||||||||||||||||||||||
| same projection. This event-only projection does not change the request used | ||||||||||||||||||||||||
| for provider execution. | ||||||||||||||||||||||||
|
Comment on lines
+241
to
+245
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Stale-session retention description is inconsistent with This says stale annotations "contain the current user turn," but 📝 Suggested wording fix- sanitize-request guardrails. Annotations retain complete history while their
- agent session is fresh (initially and after compaction); later events contain
- the current user turn. With a request codec, the emitted event input uses the
+ sanitize-request guardrails. Annotations retain complete history while their
+ agent session is fresh (initially and after compaction); later events retain
+ system instructions, the latest user message, and subsequent assistant or
+ tool messages. With a request codec, the emitted event input uses the📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||
| - Freshness belongs to agent scopes, including the implicit root. Non-agent | ||||||||||||||||||||||||
| scopes, including function and custom scopes used to model requests, inherit | ||||||||||||||||||||||||
| their nearest agent's state and do not start a new freshness budget. | ||||||||||||||||||||||||
| - LLM end output contains the provider response after response guardrails. | ||||||||||||||||||||||||
| - The LLM event includes the normalized `model_name` when you provide one. | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,7 +23,11 @@ live OTLP spans. | |
|
|
||
| - ATIF export translates NeMo Relay events into ATIF v1.7 trajectory data. | ||
| - LLM start events become `user` steps; message content is extracted from the | ||
| `LLMRequest.content` payload when possible. | ||
| request annotation when possible. Annotations retain complete history while | ||
| their agent session is fresh (initially and after compaction); otherwise, the | ||
| projection retains system instructions, the latest user message, and following | ||
| assistant or tool messages. With a request codec, the event input uses the same | ||
| projection; provider execution remains unchanged. | ||
|
Comment on lines
+26
to
+30
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win Clarify annotation history versus exported ATIF content. The ATIF adapter in Suggested wording- request annotation when possible. Annotations retain complete history while
+ request annotation when possible. The annotation retains complete history while
their agent session is fresh (initially and after compaction); otherwise, the
- projection retains system instructions, the latest user message, and following
- assistant or tool messages. With a request codec, the event input uses the same
- projection; provider execution remains unchanged.
+ annotation projection retains system instructions, the latest user message, and
+ following assistant or tool messages. The ATIF user-step projection extracts
+ the latest user message. With a request codec, the event input uses the same
+ annotation projection; provider execution remains unchanged.🤖 Prompt for AI Agents |
||
| - LLM end events become `agent` steps with response content, model metadata, | ||
| token metrics, reasoning fields, and promoted `tool_calls` when the response | ||
| uses a supported tool-call shape. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
Dense paragraph mixes six distinct concepts.
This paragraph packs freshness definition, turn-based retention, nested-agent independence, non-agent scope inheritance, codec projection/fallback, and concurrent-start semantics into one block. Splitting into a short bulleted list (one idea per item) would make this easier to scan.
📝 Suggested restructure
📝 Committable suggestion
🤖 Prompt for AI Agents