(
observations: Array<{
title: string;
narrative: string;
concepts: string[];
files: string[];
type: string;
}>,
)
| 17 | - If no entities found, output empty tags`; |
| 18 | |
| 19 | export function buildGraphExtractionPrompt( |
| 20 | observations: Array<{ |
| 21 | title: string; |
| 22 | narrative: string; |
| 23 | concepts: string[]; |
| 24 | files: string[]; |
| 25 | type: string; |
| 26 | }>, |
| 27 | ): string { |
| 28 | const items = observations |
| 29 | .map( |
| 30 | (o, i) => |
| 31 | `[${i + 1}] Type: ${o.type}\nTitle: ${o.title}\nNarrative: ${o.narrative}\nConcepts: ${(o.concepts ?? []).join(", ")}\nFiles: ${(o.files ?? []).join(", ")}`, |
| 32 | ) |
| 33 | .join("\n\n"); |
| 34 | return `Extract entities and relationships from these observations:\n\n${items}`; |
| 35 | } |
no outgoing calls
no test coverage detected