Skip to content

feat(kb-tags-filtering): filter kb docs using pre-set tags#648

Merged
waleedlatif1 merged 10 commits intostagingfrom
feat/tags-metadata
Jul 10, 2025
Merged

feat(kb-tags-filtering): filter kb docs using pre-set tags#648
waleedlatif1 merged 10 commits intostagingfrom
feat/tags-metadata

Conversation

@icecrasher321
Copy link
Collaborator

@icecrasher321 icecrasher321 commented Jul 9, 2025

Description

Can filter by tags for knowledge base chunks.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Screen.Recording.2025-07-09.at.3.11.00.PM.mov

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • All tests pass locally and in CI (bun run test)
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • I have updated version numbers as needed (if needed)
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Security Considerations:

  • My changes do not introduce any new security vulnerabilities
  • I have considered the security implications of my changes

@vercel
Copy link

vercel bot commented Jul 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sim ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 10, 2025 5:50am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Skipped (Inspect) Jul 10, 2025 5:50am

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Major update to knowledge base system implementing tag-based filtering with dedicated database schema changes and UI components.

  • Replaced generic metadata with 7 structured tag columns in both document and embedding tables with optimized btree indexes for querying
  • Added new TagInput component in /workspace/[workspaceId]/knowledge/components/tag-input/tag-input.tsx for managing document tags with collapsible UI
  • Implemented case-insensitive tag filtering in /api/knowledge/search/route.ts with parallel and single query strategies
  • Updated knowledge block configuration to support tag parameters in both search and document creation operations
  • Migration 0053_gigantic_gabe_jones.sql removes metadata column from embeddings table, requiring data migration

18 files reviewed, 27 comments
Edit PR Review Bot Settings | Greptile

@delve-auditor
Copy link

delve-auditor bot commented Jul 9, 2025

No security or compliance issues detected. Reviewed everything up to 2647d7e.

Security Overview
  • 🔎 Scanned files: 19 changed file(s)
Detected Code Changes

The diff is too large to display a summary of code changes.

Reply to this PR with @delve-auditor followed by a description of what change you want and we'll auto-submit a change to this PR to implement it.

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Vikhyath Mondreti added 2 commits July 9, 2025 13:52
@vercel vercel bot temporarily deployed to Preview – docs July 9, 2025 20:52 Inactive
@icecrasher321 icecrasher321 changed the title feat(kb-tags-filtering) feat(kb-tags-filtering): filter kb docs using pre-set tags Jul 9, 2025
@vercel vercel bot temporarily deployed to Preview – docs July 10, 2025 05:46 Inactive
@waleedlatif1 waleedlatif1 merged commit 31d9e2a into staging Jul 10, 2025
6 checks passed
@waleedlatif1 waleedlatif1 deleted the feat/tags-metadata branch July 10, 2025 22:24
arenadeveloper02 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Sep 19, 2025
…ai#648)

* feat(knowledge-base): tag filtering

* fix lint

* remove migrations

* fix migrations

* fix lint

* Update apps/sim/app/api/knowledge/search/route.ts

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* fix lint

* fix lint

* UI

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Waleed Latif <walif6@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants