Querying Hindsight Memory Engine
Before generating the dossier, the backend queries Hindsight to fetch historical context, past commitments, and entity-specific constraints related to the client.
import { HindsightClient } from '@vectorize-io/hindsight';
const hindsight = new HindsightClient({
apiKey: process.env.HINDSIGHT_API_KEY,
});
export async function fetchEntityMemory(companyName: string, meetingPurpose: string) {
// Retrieve continuous contextual facts rather than simple keyword matches
const memoryContext = await hindsight.retrieveMemory({
entityId: companyName,
query: meetingPurpose,
includeUnresolvedPromises: true,
temporalOrdering: 'descending',
});
return {
historySummary: memoryContext.summary,
openCommitments: memoryContext.unresolvedPromises,
pastFrictionPoints: memoryContext.historicalRisks,
};
}
Synthesizing the Structured Dossier Payload
The engine formats the retrieved memory along with current inputs to prompt the model
Discussion
Begin the discussion
Begin something meaningful by sharing your ideas.