@absolutejs/rag 0.24.3 → 0.24.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,12 @@ This file is generated by `absolute-changelog` from the entries in
6
6
  `changelog/`. Edit an entry, not this file — and add new ones under
7
7
  `changelog/unreleased/`.
8
8
 
9
+ ## 0.24.4 — 2026-11-03
10
+
11
+ ### Fixed
12
+
13
+ - **Bind each review tool response to the exact batch pointers and cardinality, with bounded reasons and citations, instead of permitting a full-draft response.** (`createResearch`)
14
+
9
15
  ## 0.24.3 — 2026-11-03
10
16
 
11
17
  ### Fixed
package/changelog.json CHANGED
@@ -2,6 +2,19 @@
2
2
  "contract": 1,
3
3
  "name": "@absolutejs/rag",
4
4
  "releases": [
5
+ {
6
+ "changes": [
7
+ {
8
+ "kind": "fixed",
9
+ "summary": "Bind each review tool response to the exact batch pointers and cardinality, with bounded reasons and citations, instead of permitting a full-draft response.",
10
+ "symbols": [
11
+ "createResearch"
12
+ ]
13
+ }
14
+ ],
15
+ "date": "2026-11-03",
16
+ "version": "0.24.4"
17
+ },
5
18
  {
6
19
  "changes": [
7
20
  {
@@ -122125,6 +122125,16 @@ var ReviewSchema = Type.Object({
122125
122125
  })
122126
122126
  }), { maxItems: 256 })
122127
122127
  });
122128
+ var reviewSchemaForPaths = (paths) => Type.Object({
122129
+ fields: Type.Array(Type.Object({
122130
+ ...ReviewSchema.properties.fields.items.properties,
122131
+ path: Type.Union(paths.map((path) => Type.Literal(path))),
122132
+ reason: Type.String({ maxLength: 180 }),
122133
+ citations: Type.Array(Type.Object({ passageId: Type.String() }), {
122134
+ maxItems: 4
122135
+ })
122136
+ }, { additionalProperties: false }), { minItems: paths.length, maxItems: paths.length })
122137
+ }, { additionalProperties: false });
122128
122138
  var researchLeaves = (value, maxFields = 128) => {
122129
122139
  const fields = [];
122130
122140
  const visit = (item, path, depth) => {
@@ -122717,7 +122727,7 @@ Correct the previous schema-invalid response using the validation diagnostics. T
122717
122727
  await persistReview(pass, offset, true, data);
122718
122728
  let reviewed;
122719
122729
  try {
122720
- reviewed = await generate("review", ReviewSchema, "Independently review EVERY JSON pointer and its value. supported requires exact quotes establishing the entire fact for the correct entity and time. A name mention or publication date is insufficient to establish employment, event date, ownership, or buying intent. Check all sources for actual factual contradictions. Complementary details from different sources are not a conflict; a price from one source and a term from another can jointly support a claim. Use conflicting only when sources make incompatible factual statements, unsupported for contradicted claims, unknown for missing support. Match the requested event period: an August release is not a September event even when published in September. Quoted wording must be verbatim; a paraphrase cannot be placed in quotation marks. Vendor claims about first/best status and performance metrics must remain explicitly attributed in the answer itself, not just in your reason. Null is unknown. Cite only supplied passage IDs; their text will be copied verbatim by the runtime. For each field, explicitly check answersQuestion (directly answers query/schema/instructions, not background or a non-answer), correctEntity, correctTime, and preservesScope. Read surrounding context and headings, not only the matching quote. A benefit/trial condition is not a program-wide rule; customer conditions are not partner conditions; eligible is not approved or automatic. Preserve exceptions, qualifiers and marketing attribution. Every check must pass for supported. A leader\u2019s education or career history does not answer who currently leads a team. Keep each reason under 25 words. Cite only the minimum passages needed to establish the entire field, at most four. Do not invent passage IDs. Read adjacent passages for conditions and exceptions, even when citing only one. Return each pointer once. Never treat this review as independent real-world verification.", {
122730
+ reviewed = await generate("review", reviewSchemaForPaths(batch.map((field) => field.path)), "Review ONLY the JSON pointers supplied in fields for this batch. The full answer schema is context, not a request to review other fields or reconstruct the extraction. Return exactly one verdict per supplied pointer and nothing else. supported requires exact quotes establishing the entire fact for the correct entity and time. A name mention or publication date is insufficient to establish employment, event date, ownership, or buying intent. Check all sources for actual factual contradictions. Complementary details from different sources are not a conflict; a price from one source and a term from another can jointly support a claim. Use conflicting only when sources make incompatible factual statements, unsupported for contradicted claims, unknown for missing support. Match the requested event period: an August release is not a September event even when published in September. Quoted wording must be verbatim; a paraphrase cannot be placed in quotation marks. Vendor claims about first/best status and performance metrics must remain explicitly attributed in the answer itself, not just in your reason. Null is unknown. Cite only supplied passage IDs; their text will be copied verbatim by the runtime. For each field, explicitly check answersQuestion (directly answers query/schema/instructions, not background or a non-answer), correctEntity, correctTime, and preservesScope. Read surrounding context and headings, not only the matching quote. A benefit/trial condition is not a program-wide rule; customer conditions are not partner conditions; eligible is not approved or automatic. Preserve exceptions, qualifiers and marketing attribution. Every check must pass for supported. A leader\u2019s education or career history does not answer who currently leads a team. Keep each reason under 25 words. Cite only the minimum passages needed to establish the entire field, at most four. Do not invent passage IDs. Read adjacent passages for conditions and exceptions, even when citing only one. Return each pointer once. Never treat this review as independent real-world verification.", {
122721
122731
  query: input.query,
122722
122732
  asOf: result.generatedAt,
122723
122733
  instructions: task.instructions,
@@ -123547,5 +123557,5 @@ export {
123547
123557
  selectResearchMonitorEvents
123548
123558
  };
123549
123559
 
123550
- //# debugId=98A9BACE966FD2EB64756E2164756E21
123560
+ //# debugId=1ED45F4872733D3D64756E2164756E21
123551
123561
  //# sourceMappingURL=index.js.map