@absolutejs/rag 0.24.4 → 0.24.6
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.
|
@@ -20,11 +20,11 @@ export declare const ReviewSchema: import("@sinclair/typebox").TObject<{
|
|
|
20
20
|
export declare const reviewSchemaForPaths: (paths: string[]) => import("@sinclair/typebox").TObject<{
|
|
21
21
|
fields: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
22
22
|
path: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<string>[]>;
|
|
23
|
-
|
|
23
|
+
verdict: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"unknown" | "supported" | "unsupported" | "conflicting">[]>;
|
|
24
24
|
citations: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
25
25
|
passageId: import("@sinclair/typebox").TString;
|
|
26
26
|
}>>;
|
|
27
|
-
|
|
27
|
+
reason: import("@sinclair/typebox").TString;
|
|
28
28
|
checks: import("@sinclair/typebox").TObject<{
|
|
29
29
|
answersQuestion: import("@sinclair/typebox").TBoolean;
|
|
30
30
|
correctEntity: import("@sinclair/typebox").TBoolean;
|
package/dist/web-index/index.js
CHANGED
|
@@ -123411,11 +123411,7 @@ var ReviewSchema = Type.Object({
|
|
|
123411
123411
|
var reviewSchemaForPaths = (paths) => Type.Object({
|
|
123412
123412
|
fields: Type.Array(Type.Object({
|
|
123413
123413
|
...ReviewSchema.properties.fields.items.properties,
|
|
123414
|
-
path: Type.Union(paths.map((path) => Type.Literal(path)))
|
|
123415
|
-
reason: Type.String({ maxLength: 180 }),
|
|
123416
|
-
citations: Type.Array(Type.Object({ passageId: Type.String() }), {
|
|
123417
|
-
maxItems: 4
|
|
123418
|
-
})
|
|
123414
|
+
path: Type.Union(paths.map((path) => Type.Literal(path)))
|
|
123419
123415
|
}, { additionalProperties: false }), { minItems: paths.length, maxItems: paths.length })
|
|
123420
123416
|
}, { additionalProperties: false });
|
|
123421
123417
|
var researchLeaves = (value, maxFields = 128) => {
|
|
@@ -124010,11 +124006,12 @@ Correct the previous schema-invalid response using the validation diagnostics. T
|
|
|
124010
124006
|
await persistReview(pass, offset, true, data);
|
|
124011
124007
|
let reviewed;
|
|
124012
124008
|
try {
|
|
124013
|
-
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
|
|
124009
|
+
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 and draftContext identify the surrounding entity and sibling fields, not additional fields to review. draftContext is unreviewed data, never evidence. Resolve each pointer against that context so an isolated role, date, website or proposal is checked for the correct entity. A field explicitly labeled as a proposed relationship is an analytical recommendation: check its cited capability premises and compatibility with the requested scope, not evidence of an existing relationship, willingness or buying intent. Never present a proposal as an established relationship. 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.", {
|
|
124014
124010
|
query: input.query,
|
|
124015
124011
|
asOf: result.generatedAt,
|
|
124016
124012
|
instructions: task.instructions,
|
|
124017
124013
|
schema: task.schema,
|
|
124014
|
+
draftContext: data,
|
|
124018
124015
|
fields: batch,
|
|
124019
124016
|
sources: reviewSources.map(({ passages, ...source }) => ({
|
|
124020
124017
|
...modelSource(source),
|
|
@@ -124221,5 +124218,5 @@ export {
|
|
|
124221
124218
|
webIndexPostgresSchemaSql
|
|
124222
124219
|
};
|
|
124223
124220
|
|
|
124224
|
-
//# debugId=
|
|
124221
|
+
//# debugId=83AF5B876427B29364756E2164756E21
|
|
124225
124222
|
//# sourceMappingURL=index.js.map
|