Interface SearchResult
interface SearchResult {
sessionId: string;
memories: readonly Memory[];
notice: string | null;
instructions: Instructions;
}
sessionId: string;
memories: readonly Memory[];
notice: string | null;
instructions: Instructions;
}
Properties
ReadonlysessionId
sessionId: string
The session the search was recorded against.
Readonlymemories
What matched, most relevant first.
Readonlynotice
notice: string | null
Anything the service wants to say about this particular search.
Readonlyinstructions
What the service asks the caller to do with the results.
What MemoryOperations.search returns.
memoriesis ordered most relevant first, and the knowledge lives one level down in Memory.insights — a memory is the container that makes an insight findable, not the finding itself. Expect to loop twice.A memory whose Memory.reference is set carries no insights: an earlier result in this same session already delivered them, and this entry only says where. Fetch it with MemoryOperations.getMemory by its own
idx, never the one inreference— that is what keeps a later rating with the search you are working in.sessionIdis not always the one you sent. A search naming a domain and no session opens a session and reports it here, so this is where to read the id back if you mean to rate what came out.noticeis a remark about the query itself rather than about its results, and isnullwhen there is nothing to say.instructionsis written for a model rather than for you; hand it on rather than parsing it.Example
See
MemoryOperations.shareFeedback — rating what came back is the other half of a search, and what moves an insight's reliability signal.