Skip to content

imrpovement(kb): added client-side store, shared utils, background processing, retry with exponential backoff to knowledge base#453

Merged
waleedlatif1 merged 7 commits intomainfrom
bg
Jun 3, 2025
Merged

imrpovement(kb): added client-side store, shared utils, background processing, retry with exponential backoff to knowledge base#453
waleedlatif1 merged 7 commits intomainfrom
bg

Conversation

@waleedlatif1
Copy link
Collaborator

@waleedlatif1 waleedlatif1 commented Jun 3, 2025

Description

Added client-side store, shared utils, background processing, retry with exponential backoff to knowledge base

Type of change

  • Performance improvement
  • Code refactoring (no functional changes)

How Has This Been Tested?

Tested uploading multiple, confirmed the loading state is synced between frontend and store, confirmed exponential backoff works & background processing

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 Jun 3, 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 Jun 3, 2025 6:11am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Skipped (Inspect) Jun 3, 2025 6:11am

@waleedlatif1 waleedlatif1 marked this pull request as ready for review June 3, 2025 03:11
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

This PR introduces a comprehensive knowledge base system with background document processing, vector search capabilities, and improved state management. The changes span across multiple areas including API endpoints, database schema, UI components, and utilities.

  • Added robust document processing with background tasks, status tracking, and retry mechanisms using exponential backoff for handling rate limits and transient failures
  • Implemented centralized client-side state management using Zustand store with optimistic updates and proper caching
  • Created new database schema for knowledge bases with vector search capabilities using HNSW indexing and metadata tracking
  • Added user-friendly UI components including KnowledgeBaseSelector and EditChunkModal with proper error handling and loading states
  • Improved file upload handling with S3 integration, proper filename encoding, and background processing

37 file(s) reviewed, 48 comment(s)
Edit PR Review Bot Settings | Greptile

@vercel vercel bot temporarily deployed to Preview – docs June 3, 2025 06:07 Inactive
@waleedlatif1 waleedlatif1 merged commit 1eda44d into main Jun 3, 2025
5 checks passed
@waleedlatif1 waleedlatif1 deleted the bg branch June 3, 2025 22:34
arenadeveloper02 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Sep 19, 2025
…ocessing, retry with exponential backoff to knowledge base (simstudioai#453)

* added background processing for file upload to knowledge base, added retry with exponential backoff, individual file retry, statuses

* added knowledge store

* added knowledge base selector and docs for knowledge block

* fixed build

* fix contributors page

* significantly improved error handling, typing, fault tolerance

* standardize file icon size
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.

1 participant