Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-run queries with tags on new documents #61

Open
ribenamaplesyrup opened this issue Aug 31, 2023 · 1 comment
Open

Re-run queries with tags on new documents #61

ribenamaplesyrup opened this issue Aug 31, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@ribenamaplesyrup
Copy link

First off, thanks for building this fantastic tool!

One enhancement I’m considering is allowing users to save queries they have written that contain document tags such that these queries can be reused across future sets of documents.

I’m proposing this enhancement because I think building queries from tags (as described in 'Step 6: tagging search results') is a process of optimisation that has value worth persisting. We go through a process of discovery in Semantra figuring out which combination of tags and semantic arithmetic will lead us to the most relevant results. It is easy to copy and paste simple queries across separate document searches but replicating queries with tags on new sets of documents is more involved as these queries reference files (embeddings and PDFs) that would need to be saved somewhere sensible to retrieve them. At present, to replicate a query with tags we would also need to re-tag all the document sections in Semantra.

I would love to get your general thoughts on whether or not you think this could be a worthwhile enhancement?

I’ve done some basic exploration so far and been able to export a tagged query’s POST request payload which I can re-use by making new requests to the api/query endpoint. I would ideally then like to open Semantra and actually view the results through the interface (effectively reloading the tagged query results) but I haven’t found a good way of doing this.

@freedmand
Copy link
Owner

I think this is a promising idea! One promising approach may be to:

  • allow naming saved tags from the frontend
  • have an endpoint to save a tag
  • have a backend location in the application folder, maybe a sqlite db, to save these tags
  • have an endpoint to retrieve them
  • have a dropdown in the frontend to pull them into the UI

@freedmand freedmand added the enhancement New feature or request label Dec 16, 2023
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

No branches or pull requests

2 participants