-
Notifications
You must be signed in to change notification settings - Fork 4
Synthetic readers for lexical context (addresses #497) #670
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
Merged
Merged
Changes from 9 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
9457bce
Add synthetic readers for lexical context (closes #497)
datvo06 76d86a6
Fix mypy types in synthetic-reader probe
datvo06 368e360
Constrain test_tool_calling prompt against reader exploration
datvo06 704be6f
Replace synthetic-reader singledispatch with _LexicalVariableTool
datvo06 b3e4b6f
Skip class values at _LexicalVariableTool.define
datvo06 6ef4728
Collapse skip mechanism into one _is_synthetic_reader_eligible predicate
datvo06 7f313cb
Pure-Encodable reader collection: drop isinstance pre-filter
datvo06 b4809ab
Black-format the test parametrize call
datvo06 5b569ab
Drop dunder filter from synthetic-reader gate; link Test A to #674
datvo06 4cc807e
Merge remote-tracking branch 'origin/master' into dn-pr545-synthetic-…
datvo06 b69af3b
Post-#675/#676 fixup: subclass + snapshot semantics, record Test A
datvo06 324689e
stronger test
datvo06 8226eca
Identity-check returned values in lexical-reader exposure test
datvo06 d44cc6c
Drop docstring-substring test; remove now-unused type-ignore
datvo06 4631e12
Gate synthetic lexical-reader generation behind LexicalReaders handler
datvo06 bbe3c33
remove weak test
datvo06 ea01308
Format
datvo06 74c1ae2
Promote collect_tools to a public Operation; LexicalReaders overrides it
datvo06 c19d6f9
Drop redundant Tool|Template|Agent isinstance check in LexicalReaders
datvo06 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
...ndlers_llm_provider.py__TestSyntheticReaderIntegration__test_llm_reads_lexical_value.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| { | ||
| "id": "chatcmpl-Dl3k0fEKWeTJpZDy3rcqAKPKE46Cu", | ||
| "created": 1780108168, | ||
| "model": "gpt-4o-mini-2024-07-18", | ||
| "object": "chat.completion", | ||
| "system_fingerprint": "fp_df8c8d3b43", | ||
| "choices": [ | ||
| { | ||
| "finish_reason": "tool_calls", | ||
| "index": 0, | ||
| "message": { | ||
| "content": null, | ||
| "role": "assistant", | ||
| "tool_calls": [ | ||
| { | ||
| "function": { | ||
| "arguments": "{}", | ||
| "name": "_known_data" | ||
| }, | ||
| "id": "call_DoVBVCnKiU5k7FTzWRo5nnzm", | ||
| "type": "function" | ||
| } | ||
| ], | ||
| "function_call": null, | ||
| "provider_specific_fields": { | ||
| "refusal": null | ||
| }, | ||
| "annotations": [] | ||
| }, | ||
| "provider_specific_fields": {} | ||
| } | ||
| ], | ||
| "usage": { | ||
| "completion_tokens": 11, | ||
| "prompt_tokens": 6043, | ||
| "total_tokens": 6054, | ||
| "completion_tokens_details": { | ||
| "accepted_prediction_tokens": 0, | ||
| "audio_tokens": 0, | ||
| "reasoning_tokens": 0, | ||
| "rejected_prediction_tokens": 0, | ||
| "text_tokens": null, | ||
| "image_tokens": null, | ||
| "video_tokens": null | ||
| }, | ||
| "prompt_tokens_details": { | ||
| "audio_tokens": 0, | ||
| "cached_tokens": 0, | ||
| "text_tokens": null, | ||
| "image_tokens": null, | ||
| "video_tokens": null | ||
| } | ||
| }, | ||
| "service_tier": "default" | ||
| } |
55 changes: 55 additions & 0 deletions
55
...lers_llm_provider.py__TestSyntheticReaderIntegration__test_llm_reads_lexical_value_1.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| { | ||
| "id": "chatcmpl-Dl3k2MUxG3A1S3HrmgwMXFmDNScCt", | ||
| "created": 1780108170, | ||
| "model": "gpt-4o-mini-2024-07-18", | ||
| "object": "chat.completion", | ||
| "system_fingerprint": "fp_df8c8d3b43", | ||
| "choices": [ | ||
| { | ||
| "finish_reason": "tool_calls", | ||
| "index": 0, | ||
| "message": { | ||
| "content": null, | ||
| "role": "assistant", | ||
| "tool_calls": [ | ||
| { | ||
| "function": { | ||
| "arguments": "{\"a\":10,\"b\":20}", | ||
| "name": "add_numbers" | ||
| }, | ||
| "id": "call_vypFiLTjH5MEpMKSL3VLoD4z", | ||
| "type": "function" | ||
| } | ||
| ], | ||
| "function_call": null, | ||
| "provider_specific_fields": { | ||
| "refusal": null | ||
| }, | ||
| "annotations": [] | ||
| }, | ||
| "provider_specific_fields": {} | ||
| } | ||
| ], | ||
| "usage": { | ||
| "completion_tokens": 18, | ||
| "prompt_tokens": 6077, | ||
| "total_tokens": 6095, | ||
| "completion_tokens_details": { | ||
| "accepted_prediction_tokens": 0, | ||
| "audio_tokens": 0, | ||
| "reasoning_tokens": 0, | ||
| "rejected_prediction_tokens": 0, | ||
| "text_tokens": null, | ||
| "image_tokens": null, | ||
| "video_tokens": null | ||
| }, | ||
| "prompt_tokens_details": { | ||
| "audio_tokens": 0, | ||
| "cached_tokens": 6016, | ||
| "text_tokens": null, | ||
| "image_tokens": null, | ||
| "video_tokens": null | ||
| } | ||
| }, | ||
| "service_tier": "default" | ||
| } |
55 changes: 55 additions & 0 deletions
55
...lers_llm_provider.py__TestSyntheticReaderIntegration__test_llm_reads_lexical_value_2.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| { | ||
| "id": "chatcmpl-Dl3k5bfkN00lZh8L5D82Cr9YhOJsA", | ||
| "created": 1780108173, | ||
| "model": "gpt-4o-mini-2024-07-18", | ||
| "object": "chat.completion", | ||
| "system_fingerprint": "fp_df8c8d3b43", | ||
| "choices": [ | ||
| { | ||
| "finish_reason": "tool_calls", | ||
| "index": 0, | ||
| "message": { | ||
| "content": null, | ||
| "role": "assistant", | ||
| "tool_calls": [ | ||
| { | ||
| "function": { | ||
| "arguments": "{\"a\":30,\"b\":30}", | ||
| "name": "add_numbers" | ||
| }, | ||
| "id": "call_EmO3tVtqZBqdL6K4dUqLmfgn", | ||
| "type": "function" | ||
| } | ||
| ], | ||
| "function_call": null, | ||
| "provider_specific_fields": { | ||
| "refusal": null | ||
| }, | ||
| "annotations": [] | ||
| }, | ||
| "provider_specific_fields": {} | ||
| } | ||
| ], | ||
| "usage": { | ||
| "completion_tokens": 18, | ||
| "prompt_tokens": 6104, | ||
| "total_tokens": 6122, | ||
| "completion_tokens_details": { | ||
| "accepted_prediction_tokens": 0, | ||
| "audio_tokens": 0, | ||
| "reasoning_tokens": 0, | ||
| "rejected_prediction_tokens": 0, | ||
| "text_tokens": null, | ||
| "image_tokens": null, | ||
| "video_tokens": null | ||
| }, | ||
| "prompt_tokens_details": { | ||
| "audio_tokens": 0, | ||
| "cached_tokens": 6016, | ||
| "text_tokens": null, | ||
| "image_tokens": null, | ||
| "video_tokens": null | ||
| } | ||
| }, | ||
| "service_tier": "default" | ||
| } |
55 changes: 55 additions & 0 deletions
55
...lers_llm_provider.py__TestSyntheticReaderIntegration__test_llm_reads_lexical_value_3.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| { | ||
| "id": "chatcmpl-Dl3k7gKpQZx4an1oAXAhdYViG1NjR", | ||
| "created": 1780108175, | ||
| "model": "gpt-4o-mini-2024-07-18", | ||
| "object": "chat.completion", | ||
| "system_fingerprint": "fp_df8c8d3b43", | ||
| "choices": [ | ||
| { | ||
| "finish_reason": "tool_calls", | ||
| "index": 0, | ||
| "message": { | ||
| "content": null, | ||
| "role": "assistant", | ||
| "tool_calls": [ | ||
| { | ||
| "function": { | ||
| "arguments": "{\"a\":60,\"b\":40}", | ||
| "name": "add_numbers" | ||
| }, | ||
| "id": "call_WhTflV4rMdUJUJOY2qqOHv7x", | ||
| "type": "function" | ||
| } | ||
| ], | ||
| "function_call": null, | ||
| "provider_specific_fields": { | ||
| "refusal": null | ||
| }, | ||
| "annotations": [] | ||
| }, | ||
| "provider_specific_fields": {} | ||
| } | ||
| ], | ||
| "usage": { | ||
| "completion_tokens": 18, | ||
| "prompt_tokens": 6131, | ||
| "total_tokens": 6149, | ||
| "completion_tokens_details": { | ||
| "accepted_prediction_tokens": 0, | ||
| "audio_tokens": 0, | ||
| "reasoning_tokens": 0, | ||
| "rejected_prediction_tokens": 0, | ||
| "text_tokens": null, | ||
| "image_tokens": null, | ||
| "video_tokens": null | ||
| }, | ||
| "prompt_tokens_details": { | ||
| "audio_tokens": 0, | ||
| "cached_tokens": 6016, | ||
| "text_tokens": null, | ||
| "image_tokens": null, | ||
| "video_tokens": null | ||
| } | ||
| }, | ||
| "service_tier": "default" | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.