Repository navigation
fix(examples): correct APSearch scope and validate few-shot queries - #45
Conversation
|
Warning Review limit reachedNext included review available in 11 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
63a365f to
7fad37f
Compare
0c6f1c4 to
75bbf99
Compare
dc46f34 to
ce33408
Compare
ce33408 to
815aa63
Compare
815aa63 to
022abf9
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
The shared few-shot query semantics warrant final human verification.
Pull request overview
Corrects APSearch few-shot SPARQL examples, clarifies schema guidance, and adds offline validation while preserving verified MusicBrainz queries.
Changes:
- Adds missing prefixes and updates APSearch wording and result columns.
- Documents catalogued creation-year limitations.
- Adds corpus, syntax, prefix, and schema regression tests.
File summaries
| File | Summary |
|---|---|
llm-service/tests/test_examples.py |
Adds offline corpus and APSearch query validation. |
llm-service/app/graph/schema_corpus.py |
Clarifies catalogued creation-year semantics. |
llm-service/app/graph/examples.py |
Corrects prefixes, APSearch queries, wording, and columns. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Problem
Twelve few-shot queries omit explicit prefixes. The APSearch/BBAW question promises Arabic field recordings and recording dates, but its SPARQL selects generic works between 1900 and 2024. Executing successfully does not establish those claims; the original query's 100 returned records are all typed only as generic creative works.
Change
Live findings for manual verification
The publisher path P123 → NFDI4Culture E2431 → P2888 → Q219989 is correct. APSearch has 3,005 explicitly typed audio records, 2,409 with creation years. The revised query returns 100 rows, beginning in 1970. Its explicit audio filter excludes generic records, so the revised question states that restriction. The original language/field-recording distinctions remain unsupported by structured fields; this correction changes the question accordingly.
A separate data anomaly is “Sudan Situation”, whose stored year is 9009. The intended year was not established and no source data was changed. #48 records the findings and the query for manual review; raw responses stay local.
Validation
150 backend tests pass on this branch. A new in-memory RDF test verifies media, publisher, graph and date requirements, including years outside the old cutoff. All 178 examples pass offline syntax/prefix/schema checks. Black and diff checks pass. The combined PR series passes 153 backend tests.
Eight bounded, read-only queries used the free Virtuoso endpoint. No paid model calls were made. These checks do not certify all pairs' semantic correctness or measure model accuracy. The MusicBrainz schema fix (#50) is already merged; this PR targets main.