ffb-agent.types.ts 797 B

1234567891011121314151617181920212223
  1. export type AgentIntent = 'SEARCH' | 'AGGREGATE';
  2. export interface AgentQueryPlan {
  3. intent: AgentIntent;
  4. /** Used as $vectorSearch.filter OR $match (pre-filter documents for efficiency) */
  5. preFilter?: Record<string, any>;
  6. /** Text used to generate vector embedding, if vector search is needed */
  7. vectorQuery?: string | null;
  8. /** Vector search tuning options */
  9. vectorOptions?: {
  10. limit?: number; // How many top documents to retrieve
  11. numCandidates?: number; // How many candidates to consider in search
  12. };
  13. /** Aggregation stages AFTER preFilter / vectorSearch */
  14. postPipeline?: any[]; // Should include only fields necessary for computation
  15. /** Hint for which fields to retrieve for computation */
  16. fields?: string[];
  17. }