#289 — Facade adapt knowledge base API for versioning scripts

Repo: Twill-AI/facade State: closed | Status: done Assignee: Unassigned

Created: 2025-02-25 · Updated: 2025-09-15

Description

Request

To allow versioning of knowledge base in Facade need to add db changes and API-s listed in versioning approach 1A in https://twillpayments.atlassian.net/wiki/spaces/TD/pages/250216449/RAG:

  • POST bulk delete collection documents with upserted_at > version and return them (paginated?),
  • POST bulk upsert collection documents with given upserted_at and return ID-s,
  • GET ID-s of collection documents with upserted_at > / version,
  • GET collection documents with upserted_at > version (paginated).

Acceptance criteria

  • Facade “master” tenant “text_vector” table is removed (because contains nothing, has unclear name, writing migrations would take effort) and new “knowledge_base” table is created with structure explained in wiki and 1A approach (i.e. with upserted_at timestamp auto-populated column).
  • All “knowledge base” API-s are updated with “collection” filter. Make sure that vector_search function works properly.
  • New API-s are added to “knowledge base” controller. Details see in https://twillpayments.atlassian.net/wiki/spaces/TD/pages/250216449/RAG.
  • Logic above is covered with unit tests.

Notes

Add implementation notes, blockers, and context here

Add wikilinks to related people, meetings, or other tickets