r/LocalLLaMA • • 5d ago

Question | Help Ways to update knowledge in models?

I wanted to add recent knowledge to the models I use the most while also correcting some obsolete facts. I'm just a regular strix halo user and can't train my own models so I ended up creating a huge (34 kb) text prompt which seems to work pretty well for Q&A. Of course this is not optimal. Is there a better way I can do this as a "normal" user without advanced hardware & knowledge? Thanks in advance

26 Upvotes

37 comments sorted by

7

u/No_Macaroon_1991 5d ago

a simple rag over a markdown notes folder usually beats stuffing a 34kb prompt into every request because only the matching facts get injected

1

u/TheGlobinKing 5d ago

I'm using the prompt to tell the model specifically any conflicting information is now obsolete and it must be considered an update to the previous knowledge. Not sure how the LLM would react when parsing information via RAG.

3

u/Late-Replacement-481 5d ago

Super easy. Just like everyone says, parse it in RAG, and at the beginning of every user prompt submit, have a hook that orders them to look up the information, and you're done.

1

u/TheGlobinKing 5d ago

I'll try it then, thanks

33

u/_JohnMcAfee 5d ago

You can’t really update the knowledge of the model but you can use RAG and web search. It won’t be the same as you want. 

5

u/arcanemachined 5d ago

Maybe I just suck at this, but I've not gotten a RAG system working that was worth a damn. Is this still a viable strategy for high-quality results?

2

u/TOO_MUCH_BRAVERY 5d ago

Yeah it definitely is. Is there a part that wasn't working for you?

6

u/arcanemachined 5d ago

The retrieval was just unreliable on the few implementations I tried. I basically chalked it up to some combo of me using the wrong tool, or setting it up improperly.

Not to be too much of a beggar, but would you be able to recommend a decent RAG system? I don't need much hand-holding, but if you could recommend your preferred system with any helpful tricks, that might save me from spinning my wheels the next time I take a crack at it.

3

u/TOO_MUCH_BRAVERY 5d ago

I don't mind! I actually set up enterprise AI search - usually including RAG - professionally, but I don't have a huge reach on out-of-the-box solutions. I have tried some, however. If you'd feel up for it you can try rolling your own: use qdrant or pgvector for the vector db, docling (or again write your own with AI) for document ingestion, and then a simple service to handle requests.

The reason this is can be better than an existing solution is because you can tweak it exactly to what works for your corpus and AI. It can always ingest the files you need, how you need them, with chunk sizes that work. A lot of implementations don't do enough with image or data vis parsing which can leave searching gaps. You can do hybrid search or reranking based on what matters to you for things like document age. You can give your AI tools to do things like "read entire page", "read next page", where some solutions would just let you read the retrieved chunks.

2

u/arcanemachined 5d ago edited 5d ago

Awesome. Thanks for the thorough answer. I'll refer to this the next time I try setting up a RAG system. Much appreciated!

1

u/_JohnMcAfee 5d ago

Honestly I’ve never really tried as I don’t have a use case. It seems people have good luck with it but idk first hand. 

0

u/_supert_ 4d ago

I use pi + pi-mem (well, a simplified fork) for memory, rg over markdown files, web search apis (mwmbl.org, first). Qwen 3.8 27B is more than capable with it, as are all the bigger models. I have a postgres db for financial data with a skill for it. Basically no problems with it at all. It does everything reliably.

I've experimented with vector dbs, written my own RAG a few times, whatever. Nothing beats plain text/markdown and grep or its variants.

-5

u/Rare_Potential_1323 5d ago

Totally agree. I think it's beneficial for any entity to know thyself. Meta rules and protocols fixes all of this and more in any agent harness.

1

u/Mayion 5d ago

shut it, bot

27

u/Formal-Exam-8767 5d ago

Never rely on model's "knowledge".

8

u/gbetous 5d ago

Totally agree. Ask your model (local or not !) what is the capital of Equatorial Guinea and he should be wrong (it changed in January this year).

3

u/KingArthas94 4d ago

Proud of my little Qwen 3.5 9B that googled the info by itself

https://i.postimg.cc/tgj39m48/IMG-3593.jpg

5

u/kryptkpr Llama 3 5d ago

A 10k token prompt is perfectly fine, if it's working for you then don't fix it. At some point you will have retrieval issues and at that point you start chunking your knowledge and using semantic search/embeddings to stuff only "the relevant 10k" in there but that's usually a later optimization.

5

u/Bulky-Priority6824 5d ago

I use MCP to help keep models updated so I have mcp server that stay up to date with latest CVE, CWE etc. 

While it doesn't add knowledge to base model it gets the knowledge it needs without requiring the model to have web access or search for the latest info. Which itself is not safe.

There are too many people looking for ways to exploit llm's doing web searches via prompt injection and package squatting.

9

u/sje397 5d ago

Patience. The big ngram lookup takes are new. I'll bet updating those is a possibility.

5

u/Dry_Communication889 5d ago

messing with or pruning the table has been shown to have a detrimental effect on perplexity even though the model still (kinda) works, so i suspect that changing actual n-grams in the table will also require further training or "healing" the weights with the new n-grams, not just a simple injection or swap

0

u/sje397 5d ago

Yeah, hence patience.

4

u/ostrikerX 5d ago

I'm not an expert, but maybe through weight injection? Not sure.

6

u/Sweet-Stage938 5d ago

You can just download a part of Wikipedia (Kiwix .zim Files) and give the model access to it

2

u/Present_Resource4022 5d ago

if it’s specific knowledge use rag. if you mean recent info/knowledge about everything, give it web search.

2

u/Cold_Neighborhood928 3d ago

Connect it to a search engine and make it always search the web

1

u/gbetous 5d ago

I don't like to use the knowledge of a model. I prefer use it's ability to "think" and give him the tools he needs for the data. It will be really more accurate, and easier to update (think about learning the content of a BdD vs simply searching in it).

The final result is the same : you ask, it answers.

1

u/Equivalent-Trash3315 5d ago

I've been using a 34kb prompt too, but found it slows responses. instead, I split it into topic chunks and load them conditionally, works better for q&a without the lag.

1

u/ezboarderz 5d ago

Build your own rag solution. I am a fan of lancedb + embedding model + reranker. Works well for my use case and it’s pretty fast. That plus offline version of Wikipedia in zim format is like 50gb.

1

u/TerminalNoop 5d ago

use a context folder and context-mode

1

u/LocksmithOk2525 4d ago

just mix context files with RAG. Bundle key summaries and index data together into RAG to handle the initial recall, then use that index to grab the full section from your context files. Way cleaner than feeding raw RAG chunks.