Skip to content

feat(examples): add verified task examples - #223

Open
svonava wants to merge 5 commits into
mainfrom
feat/authentic-task-examples
Open

feat(examples): add verified task examples#223
svonava wants to merge 5 commits into
mainfrom
feat/authentic-task-examples

Conversation

@svonava

@svonava svonava commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Adds runnable examples for reranking, named entity extraction, and multimodal search.\n\nEach example includes primary-source inputs, exact recorded public SIE responses, checksummed evidence manifests, and offline fail-closed tests. The multimodal example includes the licensed source images and full vectors needed to recompute every displayed cosine score.\n\nValidation: 17 unit tests, Ruff, Ty, JSON and artifact hashes, and examples-only scope checks.

Summary by CodeRabbit

  • New Features
    • Added runnable verified examples for multimodal image search, named-entity extraction, and primary-source passage reranking, including adding the reranking example to the gallery.
  • Documentation
    • Added/expanded READMEs with run instructions, verification details, artifact locations, and offline testing steps for each example.
  • Bug Fixes
    • Tightened response validation to reject boolean score values in reranking and named-entity extraction.
  • Tests
    • Strengthened offline integration tests with additional failure-mode coverage (tampering, non-finite scores, and unexpected top-match handling) while keeping deterministic checks.
  • Chores
    • Updated example .gitignore files to exclude common local runtime artifacts.

@svonava

svonava commented Jul 25, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@svonava

svonava commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

Review update:\n\n- Fixed the provenance tests so the documented uv run workflow does not scan generated virtual-environment metadata.\n- Added all three uv.lock files and reran with the resolved SIE SDK and Ruff versions.\n- Verified 17 offline tests, artifact hashes, full-vector score recomputation, source offsets, Ruff lint, and Ruff format.\n\nNo model calls or recorded outputs were rewritten.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 9c95d267-cbc8-4344-992b-c7e688770d1f

📥 Commits

Reviewing files that changed from the base of the PR and between 56a0566 and bf3f1c7.

📒 Files selected for processing (1)
  • examples/named-entity-extraction/tests/test_example.py

📝 Walkthrough

Walkthrough

The PR adds three standalone, verified SIE examples for multimodal search, named-entity extraction, and primary-source reranking, with runners, validation logic, offline tests, project configuration, documentation, and recorded-artifact integrity checks.

Changes

Verified SIE examples

Layer / File(s) Summary
Multimodal search workflow
examples/multimodal-search/*
Adds a SigLIP-based image search runner that validates licensed inputs, computes cosine rankings, and checks that the expected handbag ranks first. Documentation, project setup, and offline tests verify vectors, audit envelopes, manifests, and metadata.
Named-entity extraction workflow
examples/named-entity-extraction/*
Adds extraction validation that rejects boolean and non-finite scores while preserving span, label, anchor, manifest, and metadata checks in the offline test suite. Documentation and project setup describe local and hosted execution.
Primary-source reranking workflow
examples/rerank/*, examples/README.md
Adds score-based reranking documentation and gallery registration, rejects boolean scores, and verifies recorded responses, manifests, audit envelopes, and metadata offline.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant run_search
  participant SIEClient
  participant Evaluator
  CLI->>run_search: execute search
  run_search->>SIEClient: encode query and images
  SIEClient-->>run_search: return embedding responses
  run_search->>Evaluator: compute cosine similarities
  Evaluator-->>CLI: return verified ranked matches
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding verified runnable examples under examples/.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/authentic-task-examples

Comment @coderabbitai help to get the list of available commands.

@svonava

svonava commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (1)
examples/named-entity-extraction/tests/test_example.py (1)

68-95: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Failure-path coverage is limited to one branch of validate_response.

Only the "missing required anchors" branch is tested. validate_response also raises on unrequested labels, out-of-bounds/mismatched offsets, and invalid/out-of-range scores (Lines 163-177 of run.py), none of which have dedicated tests. Consider adding tests for at least one or two of these to guard the fail-closed contract as the recorded artifacts evolve.

As per path instructions, "Check that commands match the implementation and that tests cover failure paths."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@examples/named-entity-extraction/tests/test_example.py` around lines 68 - 95,
Expand failure-path coverage for validate_response beyond the existing
missing-required-anchors case by adding dedicated tests for at least one or two
other validation failures, such as unrequested labels, invalid or out-of-range
offsets, or invalid scores. Each test should construct an otherwise
representative response, assert the expected ValueError and message, and
preserve the existing artifact-based test setup.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@examples/multimodal-search/tests/test_example.py`:
- Around line 25-93: Add failure-path tests to MultimodalSearchExampleTests
covering checksum tampering, incorrect image counts, a true
synthetic_or_generated_images flag, non-finite vectors passed to dense_vector,
and an unexpected top match from evaluate. Assert each relevant
load_and_verify_sources, _validate_sources_dict, dense_vector, or evaluate call
raises ValueError, using the existing fixtures and validation entry points
without weakening success-path assertions.
- Around line 9-11: Fix the Ruff E402 violation in the test module by avoiding
the runtime sys.path.insert followed by a top-level import run; use an import
approach that preserves access to the example’s run module without placing an
import after executable statements. Alternatively, add the targeted tests/* E402
per-file ignore in pyproject.toml if retaining the current import pattern.

In `@examples/named-entity-extraction/tests/test_example.py`:
- Around line 9-11: Fix Ruff E402 in the test module by adding a targeted
per-file ignore for this file in the nearest pyproject.toml, rather than
changing the runtime path setup or import order. Keep the existing ROOT,
sys.path.insert, and import run behavior unchanged.

In `@examples/rerank/run.py`:
- Around line 147-150: Reject boolean values in the score validation loop of
validate_response by checking for bool before the numeric and finite checks. In
examples/rerank/run.py lines 147-150, preserve the existing ValueError for
invalid scores; in examples/rerank/tests/test_example.py lines 38-58, change one
recorded score to True and assert that validate_response raises ValueError.

In `@examples/rerank/tests/test_example.py`:
- Around line 9-11: Update the module-level imports in test_example.py: import
importlib before modifying sys.path, then load the run module via importlib
after sys.path.insert executes, eliminating Ruff E402 while preserving the
existing module resolution.

---

Nitpick comments:
In `@examples/named-entity-extraction/tests/test_example.py`:
- Around line 68-95: Expand failure-path coverage for validate_response beyond
the existing missing-required-anchors case by adding dedicated tests for at
least one or two other validation failures, such as unrequested labels, invalid
or out-of-range offsets, or invalid scores. Each test should construct an
otherwise representative response, assert the expected ValueError and message,
and preserve the existing artifact-based test setup.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 70111323-ba00-4b7b-950c-65e59cd6e9a4

📥 Commits

Reviewing files that changed from the base of the PR and between 4b5ea9c and 44e2026.

⛔ Files ignored due to path filters (41)
  • .coderabbit.yaml is excluded by none and included by none
  • examples/multimodal-search/data/images/black-camera.png is excluded by !**/*.png, !examples/**/data/** and included by examples/**
  • examples/multimodal-search/data/images/black-handbag.jpg is excluded by !**/*.jpg, !examples/**/data/** and included by examples/**
  • examples/multimodal-search/data/images/blue-running-sneaker.png is excluded by !**/*.png, !examples/**/data/** and included by examples/**
  • examples/multimodal-search/data/images/green-backpack.png is excluded by !**/*.png, !examples/**/data/** and included by examples/**
  • examples/multimodal-search/data/images/red-leather-handbag.png is excluded by !**/*.png, !examples/**/data/** and included by examples/**
  • examples/multimodal-search/data/images/red-shoes.jpg is excluded by !**/*.jpg, !examples/**/data/** and included by examples/**
  • examples/multimodal-search/data/sources.json is excluded by !examples/**/data/** and included by examples/**
  • examples/multimodal-search/uv.lock is excluded by !**/*.lock, !examples/**/uv.lock and included by examples/**
  • examples/multimodal-search/verified-run/evaluation.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/multimodal-search/verified-run/manifest.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/multimodal-search/verified-run/raw/image-candidate-embeddings.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/multimodal-search/verified-run/raw/text-query-embedding.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/multimodal-search/verified-run/requests/image-candidates.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/multimodal-search/verified-run/requests/text-query.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/named-entity-extraction/data/cases.json is excluded by !examples/**/data/** and included by examples/**
  • examples/named-entity-extraction/data/sources.json is excluded by !examples/**/data/** and included by examples/**
  • examples/named-entity-extraction/uv.lock is excluded by !**/*.lock, !examples/**/uv.lock and included by examples/**
  • examples/named-entity-extraction/verified-run/evaluation.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/named-entity-extraction/verified-run/manifest.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/named-entity-extraction/verified-run/raw/cms-orthosis-documentation.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/named-entity-extraction/verified-run/raw/ntsb-bearing-alert.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/named-entity-extraction/verified-run/raw/sec-restatement.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/named-entity-extraction/verified-run/raw/supreme-court-caption.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/named-entity-extraction/verified-run/requests/cms-orthosis-documentation.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/named-entity-extraction/verified-run/requests/ntsb-bearing-alert.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/named-entity-extraction/verified-run/requests/sec-restatement.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/named-entity-extraction/verified-run/requests/supreme-court-caption.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/rerank/data/cases.json is excluded by !examples/**/data/** and included by examples/**
  • examples/rerank/data/sources.json is excluded by !examples/**/data/** and included by examples/**
  • examples/rerank/uv.lock is excluded by !**/*.lock, !examples/**/uv.lock and included by examples/**
  • examples/rerank/verified-run/evaluation.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/rerank/verified-run/manifest.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/rerank/verified-run/raw/cms-orthosis-documentation.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/rerank/verified-run/raw/ntsb-bearing-alert.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/rerank/verified-run/raw/sec-restatement.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/rerank/verified-run/raw/supreme-court-arbitration.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/rerank/verified-run/requests/cms-orthosis-documentation.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/rerank/verified-run/requests/ntsb-bearing-alert.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/rerank/verified-run/requests/sec-restatement.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/rerank/verified-run/requests/supreme-court-arbitration.json is excluded by !examples/**/verified-run/** and included by examples/**
📒 Files selected for processing (16)
  • examples/README.md
  • examples/multimodal-search/.gitignore
  • examples/multimodal-search/README.md
  • examples/multimodal-search/pyproject.toml
  • examples/multimodal-search/run.py
  • examples/multimodal-search/tests/test_example.py
  • examples/named-entity-extraction/.gitignore
  • examples/named-entity-extraction/README.md
  • examples/named-entity-extraction/pyproject.toml
  • examples/named-entity-extraction/run.py
  • examples/named-entity-extraction/tests/test_example.py
  • examples/rerank/.gitignore
  • examples/rerank/README.md
  • examples/rerank/pyproject.toml
  • examples/rerank/run.py
  • examples/rerank/tests/test_example.py

Comment thread examples/multimodal-search/tests/test_example.py Outdated
Comment thread examples/multimodal-search/tests/test_example.py
Comment thread examples/named-entity-extraction/tests/test_example.py Outdated
Comment thread examples/rerank/run.py
Comment thread examples/rerank/tests/test_example.py Outdated
@svonava

svonava commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.


Your included review limit is currently reached under our Fair Usage Limits Policy. Your recent PR review activity is in the 95th percentile or higher among CodeRabbit users, so adaptive limits apply. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 49 minutes.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@examples/named-entity-extraction/run.py`:
- Around line 173-177: Update the score validation around entity score
extraction to explicitly reject boolean values before numeric validation, while
preserving finite and 0–1 range checks for valid numbers. Add a regression test
in the named-entity extraction example tests confirming boolean scores are
rejected.

In `@examples/rerank/tests/test_example.py`:
- Around line 38-58: Add a failure-path test alongside
test_recorded_responses_pass_fail_closed_checks that mutates a recorded response
to create an invalid validation case, then assert run.validate_response raises
ValueError. Reuse the existing case-loading, artifact lookup, and
response-reading setup, and preserve the current success-path assertions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 18dc32af-abcb-4276-b7b6-1954fd6befce

📥 Commits

Reviewing files that changed from the base of the PR and between 4b5ea9c and 44e2026.

⛔ Files ignored due to path filters (41)
  • .coderabbit.yaml is excluded by none and included by none
  • examples/multimodal-search/data/images/black-camera.png is excluded by !**/*.png, !examples/**/data/** and included by examples/**
  • examples/multimodal-search/data/images/black-handbag.jpg is excluded by !**/*.jpg, !examples/**/data/** and included by examples/**
  • examples/multimodal-search/data/images/blue-running-sneaker.png is excluded by !**/*.png, !examples/**/data/** and included by examples/**
  • examples/multimodal-search/data/images/green-backpack.png is excluded by !**/*.png, !examples/**/data/** and included by examples/**
  • examples/multimodal-search/data/images/red-leather-handbag.png is excluded by !**/*.png, !examples/**/data/** and included by examples/**
  • examples/multimodal-search/data/images/red-shoes.jpg is excluded by !**/*.jpg, !examples/**/data/** and included by examples/**
  • examples/multimodal-search/data/sources.json is excluded by !examples/**/data/** and included by examples/**
  • examples/multimodal-search/uv.lock is excluded by !**/*.lock, !examples/**/uv.lock and included by examples/**
  • examples/multimodal-search/verified-run/evaluation.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/multimodal-search/verified-run/manifest.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/multimodal-search/verified-run/raw/image-candidate-embeddings.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/multimodal-search/verified-run/raw/text-query-embedding.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/multimodal-search/verified-run/requests/image-candidates.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/multimodal-search/verified-run/requests/text-query.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/named-entity-extraction/data/cases.json is excluded by !examples/**/data/** and included by examples/**
  • examples/named-entity-extraction/data/sources.json is excluded by !examples/**/data/** and included by examples/**
  • examples/named-entity-extraction/uv.lock is excluded by !**/*.lock, !examples/**/uv.lock and included by examples/**
  • examples/named-entity-extraction/verified-run/evaluation.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/named-entity-extraction/verified-run/manifest.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/named-entity-extraction/verified-run/raw/cms-orthosis-documentation.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/named-entity-extraction/verified-run/raw/ntsb-bearing-alert.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/named-entity-extraction/verified-run/raw/sec-restatement.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/named-entity-extraction/verified-run/raw/supreme-court-caption.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/named-entity-extraction/verified-run/requests/cms-orthosis-documentation.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/named-entity-extraction/verified-run/requests/ntsb-bearing-alert.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/named-entity-extraction/verified-run/requests/sec-restatement.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/named-entity-extraction/verified-run/requests/supreme-court-caption.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/rerank/data/cases.json is excluded by !examples/**/data/** and included by examples/**
  • examples/rerank/data/sources.json is excluded by !examples/**/data/** and included by examples/**
  • examples/rerank/uv.lock is excluded by !**/*.lock, !examples/**/uv.lock and included by examples/**
  • examples/rerank/verified-run/evaluation.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/rerank/verified-run/manifest.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/rerank/verified-run/raw/cms-orthosis-documentation.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/rerank/verified-run/raw/ntsb-bearing-alert.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/rerank/verified-run/raw/sec-restatement.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/rerank/verified-run/raw/supreme-court-arbitration.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/rerank/verified-run/requests/cms-orthosis-documentation.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/rerank/verified-run/requests/ntsb-bearing-alert.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/rerank/verified-run/requests/sec-restatement.json is excluded by !examples/**/verified-run/** and included by examples/**
  • examples/rerank/verified-run/requests/supreme-court-arbitration.json is excluded by !examples/**/verified-run/** and included by examples/**
📒 Files selected for processing (16)
  • examples/README.md
  • examples/multimodal-search/.gitignore
  • examples/multimodal-search/README.md
  • examples/multimodal-search/pyproject.toml
  • examples/multimodal-search/run.py
  • examples/multimodal-search/tests/test_example.py
  • examples/named-entity-extraction/.gitignore
  • examples/named-entity-extraction/README.md
  • examples/named-entity-extraction/pyproject.toml
  • examples/named-entity-extraction/run.py
  • examples/named-entity-extraction/tests/test_example.py
  • examples/rerank/.gitignore
  • examples/rerank/README.md
  • examples/rerank/pyproject.toml
  • examples/rerank/run.py
  • examples/rerank/tests/test_example.py

Comment thread examples/named-entity-extraction/run.py
Comment thread examples/rerank/tests/test_example.py

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
examples/named-entity-extraction/tests/test_example.py (1)

84-91: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Cover non-finite scores in the regression tests.

The runner now rejects NaN and infinities, but this test only exercises boolean scores. Add cases for float("nan"), float("inf"), and float("-inf").

As per path instructions, examples/** tests must cover failure paths.

Proposed test addition
+    def test_non_finite_score_fails_closed(self) -> None:
+        cases, _ = run.load_and_verify_inputs()
+        case_id = "scotus_two_contracts"
+        response = run.read_json(ROOT / "verified-run" / "raw" / "supreme-court-caption.json")
+
+        for score in (float("nan"), float("inf"), float("-inf")):
+            with self.subTest(score=score):
+                response["entities"][0]["score"] = score
+                with self.assertRaisesRegex(ValueError, "Invalid score"):
+                    run.validate_response(case_id, cases["cases"][case_id], response)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@examples/named-entity-extraction/tests/test_example.py` around lines 84 - 91,
Add regression coverage in test_boolean_score_fails_closed for non-finite entity
scores by exercising float("nan"), float("inf"), and float("-inf") through
run.validate_response. Assert each case raises ValueError with the existing
"Invalid score" message, while preserving the current boolean-score assertion.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@examples/named-entity-extraction/tests/test_example.py`:
- Around line 84-91: Add regression coverage in test_boolean_score_fails_closed
for non-finite entity scores by exercising float("nan"), float("inf"), and
float("-inf") through run.validate_response. Assert each case raises ValueError
with the existing "Invalid score" message, while preserving the current
boolean-score assertion.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: f08c07fc-6574-475e-905d-27e2211a8b27

📥 Commits

Reviewing files that changed from the base of the PR and between 44e2026 and 56a0566.

📒 Files selected for processing (5)
  • examples/multimodal-search/tests/test_example.py
  • examples/named-entity-extraction/run.py
  • examples/named-entity-extraction/tests/test_example.py
  • examples/rerank/run.py
  • examples/rerank/tests/test_example.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant