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

Add better support for meta-level/summarization questions #509

Open
sabaimran opened this issue Oct 19, 2023 · 1 comment
Open

Add better support for meta-level/summarization questions #509

sabaimran opened this issue Oct 19, 2023 · 1 comment
Labels
upgrade New feature or request

Comments

@sabaimran
Copy link
Collaborator

sabaimran commented Oct 19, 2023

One limitation of Khoj currently is that it's not very good at answering meta-level question. For example, "How many notes do I have about Spanish lessons?" or "What was the first issue related to offline models in the Khoj repository?" won't be very effective. More categorical, specific questions however do perform well.

This may need re-thinking of how we index data. Now that we're introducing a Postgres backend (refer to efforts in the PRs from #487 and others tagged with [Multi-User]), we could add an extra layer for the LLM to run any subqueries that would be necessary for executing this request.

For example, "How many notes do I have about Spanish lessons?" can be converted to something like SELECT * FROM database_embeddings WHERE distance <0.1, where distance is computed between the vectorized column and the query string.

I do think this would generally be useful for any kind of meta-analysis.

See relevant discussion in Discord.

@sabaimran sabaimran added the upgrade New feature or request label Oct 19, 2023
@FetchFast
Copy link

Or would a memgpt style approach of memory be a better way to go? (see memgpt github code)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upgrade New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants