I should look into this because I have over 132000 words of text in my notes (more than the average novel) and I'm curious whether I can 'talk' to my second brain via a LLM.
Smart Connections[0] plug-in for Obsidian is worth checking out.
It does a really good job of indexing (with local or OpenAI embeddings) and RAG allowing you to chat with various models about your notes. The chunking and context algorithms it uses seem to be well designed and find most/all relevant details for most things I try to discuss.
It's well implemented and provides useful and interesting discussions with my journal/notes.
You could first ask a LLM to compress your notes. There was some informal research into this a while back, LLMs have the ability to translate text into a much shorter representation that only they can understand. That might allow you to get around the context size limits.
More practically (or additionally) you could just ask it to summarize them or extract the most relevant parts.
Alternatively, I think the most popular approach is to use a RAG thing though someone else will have to fill you in on the current state of the art.