logancyang / obsidian-copilot

THE Copilot in Obsidian
https://www.obsidiancopilot.com/
GNU Affero General Public License v3.0
2.98k stars 207 forks source link

ADD HyDE RAG function as part of the vault QA #645

Closed chenyuz3 closed 1 month ago

chenyuz3 commented 1 month ago

Can we add HyDE RAG function as part of the vault QA? Currently the vault QA functions seem very primitive as in many times it will find the most relevant notes to the input but say "the context has no information on..." or simply misunderstand the question. (Partly because the system prompt is not working in the vault Q&A function from my observation)

The smart connections plugin uses HyDE RAG reasonably well though it is too buggy to be used as a whole. I think it is relatively easy to implement HyDE compared to others like Graph RAG or re-rankers etc. and the solution can be very universal no matter whatever LLMs/embedding models we are using.

Here is just an example of copilot finding the right relevant notes but failed to organize an answer image

logancyang commented 1 month ago

HyDE is just one of many improvements for Vault QA on my roadmap. There's more in the coming weeks, stay tuned.

wwjCMP commented 1 month ago

I think the reason is your LLM model didnt have enough parameters. Maybe you should increase the temperature in setting.

chenyuz3 commented 1 month ago

I think the reason is your LLM model didnt have enough parameters. Maybe you should increase the temperature in setting.

The example had a temperature of 0.85 and I tried to increase it to 2 and the it offered the same result.

wwjCMP commented 1 month ago

I think the reason is your LLM model didnt have enough parameters. Maybe you should increase the temperature in setting.

The example had a temperature of 0.85 and I tried to increase it to 2 and the it offered the same result.

Are you using local LLM? Maybe you can try groq or gemini, which offer free APIs.

chenyuz3 commented 1 month ago

I think the reason is your LLM model didnt have enough parameters. Maybe you should increase the temperature in setting.

The example had a temperature of 0.85 and I tried to increase it to 2 and the it offered the same result.

Are you using local LLM? Maybe you can try groq or gemini, which offer free APIs.

I use Gemini 1.5 flash via openrouter API

wwjCMP commented 1 month ago

I think the reason is your LLM model didnt have enough parameters. Maybe you should increase the temperature in setting.

The example had a temperature of 0.85 and I tried to increase it to 2 and the it offered the same result.

Are you using local LLM? Maybe you can try groq or gemini, which offer free APIs.

I use Gemini 1.5 flash via openrouter API

You can try gemini or grop directly

tarockey commented 1 month ago

Similarly, and I don't know enough about 1) How Obsidian stores data, and 2) how well it would work as a graph - but something like GraphRag could be interesting to explore: https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/