Skip to content

Feature/prompt studio document manager#78

Merged
nehabagdia merged 35 commits into
mainfrom
feature/prompt-studio-document-manager
Mar 11, 2024
Merged

Feature/prompt studio document manager#78
nehabagdia merged 35 commits into
mainfrom
feature/prompt-studio-document-manager

Conversation

@tahierhussain
Copy link
Copy Markdown
Contributor

@tahierhussain tahierhussain commented Mar 10, 2024

What

  1. Added a new table to store the document related details.
  2. Added a new table to store the indexing related details.
  3. UI changes to display the indexing status for each combination of document and LLM profile.
  4. Other UI/UX improvements.

Why

Previously, we were not storing the index status. As a result, we were unable to display it in the UI. Because of the limited information, the user-experience in the prompt studio didn't feel great.

How

NA

Database Migrations

Made the following changes in DB migrations:

  1. Added a new table to persist document details: This table will primarily store the document name and the prompt studio ID.
  2. Added a new table to persist index details: This table will primarily store the following: Vector DB IDs for raw and summarized content, history of Vector DB IDs for all versions of the corresponding profile manager, and a unique combination of document ID and profile manager ID.
  3. Modified the output manager table: Previously, the document name was stored directly to uniquely identify the document. Now, I'm associating it with the document manager table. Also, changed on_delete values to CASCADE wherever necessary.

Env Config

NA

Relevant Docs

NA

Related Issues or PRs

NA

Dependencies Versions

NA

Notes on Testing

Two major things needed to be tested in this PR:

  1. Check if the functionalities related to documents are working fine, since there has been some substantial amount of work that has gone it.
  2. Check if the index status for each combination of document and LLM profile is properly displayed in the UI.

Here are some of the steps I followed to make sure if everything worked fine,

  1. Created a new LLM profile, named profile1.
  2. Uploaded the document and indexed it for profile1.
  3. The status was successfully updated in the Document Manager table.
  4. Then created a new LLM profile, named profile2.
  5. Entered the prompt and ran it before indexing. This will help us check if it is indexed before fetching the result.
  6. After the result is generated, checked the document manager to see if it was indexed for profile2.
  7. Enabled summarization and reindexed inside the document manager to check if it gets indexed properly.
  8. Cleared the database and repeated the same steps to ensure everything worked fine.

Screenshots

Screenshot from 2024-03-11 00-30-09

Checklist

I have read and understood the Contribution Guidelines.

tahierhussain and others added 30 commits March 6, 2024 14:50
…b.com:Zipstack/unstract into feature/prompt-studio-document-manager
…b.com:Zipstack/unstract into feature/prompt-studio-document-manager
Comment thread backend/prompt_studio/prompt_studio_core/prompt_studio_helper.py Outdated
Comment thread backend/prompt_studio/prompt_studio_document_manager/constants.py Outdated
Comment thread backend/prompt_studio/prompt_studio_document_manager/exceptions.py Outdated
@hari-kuriakose
Copy link
Copy Markdown
Contributor

@tahierhussain The migrations look good.

@nehabagdia nehabagdia merged commit af6139f into main Mar 11, 2024
@nehabagdia nehabagdia deleted the feature/prompt-studio-document-manager branch March 11, 2024 02:06
pk-zipstack pushed a commit that referenced this pull request Aug 20, 2025
* Implemented re-index

* Fixed data persistence issue in the summarize modal

* Reverted to the default background color of the PDF viewer

* UI Improvements in Output Analyzer

* Fixed issue with spaces in the prompt/notes card

* Added loader to the submit button

* Revert "FIX: Prompt Studio Bug Fixed (#65)"

This reverts commit 35429b1.

* Revert "Revert "FIX: Prompt Studio Bug Fixed (#65)""

This reverts commit 1e2921d.

* Revert "FIX: Prompt Studio Bug Fixed (#65)"

This reverts commit 35429b1.

* Backend changes related to document manager

* UI changes related to document manager

* Index Manager and Document Manager changes

* Code efficiency improvement in the document manager BE

* UI changes to support document manager changes

* implemented new design

* Added API support for index manager

* FE changes for showing the indexing status in the Manage Documents table

* fixed prompt list not updated after adding new prompt

* UI bug fixes and improvements

* UI bug fixes

* Optimized migrations

* Modification in migrations

* Code quality improvement

---------

Co-authored-by: Neha <115609453+nehabagdia@users.noreply.github.com>
Co-authored-by: Jaseem Jas <89440144+jaseemjaskp@users.noreply.github.com>
Co-authored-by: jagadeeswaran-zipstack <jagadeeswaran@zipstack.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants