Skip to content

Add recall filters: by entity type, by source, by confidence threshold #5

Description

@josharsh

Summary

Currently recall() accepts query, limit, bankId, and time filters. In practice, users need more granular filtering:

  • By entity type — "recall only facts about people" or "only facts about companies"
  • By source — "recall only facts from Slack" or "only facts from meetings"
  • By confidence — "recall only facts with confidence > 0.8"

What needs to happen

  1. Extend the RecallOptions type in src/types.ts with optional filter fields:
    entityType?: string;      // filter facts linked to entities of this type
    source?: string;          // filter by source field
    minConfidence?: number;   // minimum confidence threshold
  2. Update the recall pipeline in src/pipelines/recall.ts to apply these filters
  3. Update the MCP server in src/mcp/server.ts to expose these as tool parameters
  4. Add tests in tests/

Files to look at

  • src/types.ts — RecallOptions interface
  • src/pipelines/recall.ts — the recall pipeline
  • src/store/store.ts — underlying queries
  • src/mcp/server.ts — MCP tool definitions

Acceptance criteria

  • recall({ query: '...', entityType: 'person' }) returns only person-linked facts
  • recall({ query: '...', source: 'slack' }) filters by source
  • recall({ query: '...', minConfidence: 0.8 }) filters low-confidence results
  • Filters combine (AND logic)
  • MCP recall tool accepts the new parameters
  • Tests for each filter and combinations

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: mcpMCP server integrationarea: searchRecall and hybrid searchenhancementNew feature or requesthelp wantedExtra attention is neededup-for-grabsListed on upforgrabs.net

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions