7 ms·
Training LLMs to generate text with citations via fine-grained rewards
- dmezzetti 3y agoVery interesting approach. For those interested in an alternate method that doesn't depend on a LLM, check out this article: https://neuml.hashnode.dev/build-rag-pipelines-with-txtai https://neuml.hashnode.dev/build-rag-pipelines-with-txtai Disclaimer: I'm the primary author of txtai.
- leobg 3y agoAre you affiliated with txtai?
- jerpint 3y agoLooks like it’s just RAG? The paper is proposing an alternative to RAG due to its shortcomings
- dmezzetti 3y agoIt's RAG and a method that identifies citations from the context.
- bugglebeetle 3y agoThe shortcoming of most RAG-based approaches is the assumption that the question resembles the answer in a way that also jives with the embeddings model. Thus far, I’ve not seen strong evidence (or in my testing) that this is true or works well, but at least citation allows for better assessment. The problem seems to be that we don’t have a good feedback loop for ranking RAG retrieval, as we have for LLMs with things like DPO.
- whakim 3y ago100%. This is why RAG and "classical search" will converge for non-trivial use cases. The folks who are doing RAG well still rely on many tried-and-true tricks of the trade: combining semantic search with keyword-based search, using graphs, doing re-ranking, etc. etc. Yet most discussions of RAG on the internet seem to promise consistently awesome query output by just jamming together some embeddings and an LLM, which doesn't pan out in practice.
- dang 3y agoCan you please stop posting so promotionally on HN? If you read https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html, you'll see it's against the site guidelines.
- dmezzetti 3y agoYou got it and I appreciate you asking kindly. I will say though that hopefully you'll consider applying that policy equally to all. Because many VC-backed and large companies basically post press releases and they trend without issue. I'm a single person open-source project. But it's your site, I'll respect your request and not post moving forward.
- dang 3y agoI certainly hope we apply things equally! But there are inevitably cases we miss because we don't see everything that gets posted to HN; we largely rely on users to point us to those.
- dmezzetti 3y agoI'm sure it's a tough challenge. And that's just keeping up with the people who are being open and honest about their product/project associations, never mind the others. I appreciate all you do in keeping the site up and running along with the dedication to ensuring it has high-quality content.
- mountainriver 3y agoI found what he posted relevant and useful, not sure what the issue is
- dang 3y agoOh yes, the GP comment was fine in isolation. The issue has to do with posting similar things too often. If an account is using HN primarily for promotion, that's not in the intended spirit of the site. This is in the site guidelines: https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html.
- skeptrune 3y agoThis is soooo much more exciting than the "put 100M tokens in the context window" idea
- amelius 3y agoELIZA was so much more exciting than the "put 100B artificial neurons on a GPU" idea. ;)
- bugglebeetle 3y agoI would say the large context sizes with the ability to reliably cite said context is the best possible outcome.
- th0ma5 3y agoIt is my understanding there is no way to objectively or programmatically tell if any of this stuff is correct or doesn't obfuscate some dire error. These tricks don't give me confidence that we're headed in that direction either.
- nerdponx 3y agoAny LLM/GPT system is fundamentally stochastic, so yes, kind of? But it's hardly a "trick" to come up with a way to make them work the way we want them to work. An LLM is based on the idea that there is some very complicated function y(t) = f(y(t-1), y(t-2), ..., y(t-K)) for any sequence of text tokens t(1), y(2), ... and some huge context size K. We fit the model by attempting to find an approximation of f() with a low badness score (called "loss"). We also don't usually want the absolute lowest badness score, because there is always some tradeoff between between minimizing loss on the specific test data that we happen to have, and preserving the ability to generalize to content outside of the test data. The technique here is an improvement to that process of finding a good approximation of f(). The specific technique here is to adjust the loss to mean something more specific than "error rate on predicting the next word in a sequence." The entire basis of the principle is that the loss function controls what the model learns. If we want it to produce more sentences that look a certain way, we introduce a reward for generating sentences that look that way. If we want to avoid certain kinds of outputs, we introduce a penalty for generating those kinds of outputs. From there, it's just gradient descent. Better outputs produce lower losses, so the model starts producing better outputs, without us having to really know or care about what the model is doing internally. The technique of RLHF is similar along those lines. We discourage the model to hallucinate by having a human review its output and report when the model hallucinates, so we can impose a penalty for hallucination, and thereby shift the model output in the direction of not-hallucinating after many such rounds of "learning". Is it a fundamental shift in how LLMs work? No. Could it possibly lead to improvements? Yes.
- th0ma5 3y agoI mean, doesn't that sweep the problem I'm describing into the loss function definition?
- serjester 3y agoThis is fantastic if this starts working on smaller models. We've have solid results with appending the following to our GPT-4 system prompt. "When possible cite your sources. Use the following custom html format <citation>{document_id}†{node_id}</citation>. Very important!"
- anon-sre-srm 3y agoI'm concerned innovations in LLMs will silently replace human expertise in unverifiable and bitrot ways ultimately leading to widespread decline in mastery in many fields and possibly the loss of ability to teach, mentor, or maintain incomes of actual subject matter experts gradually to a point where no human SMEs can be found for critical technology or research necessary for organized civilization. Brave New World-Idiocracy with such incapable people in it. I'm betting climate change will also get us with hypercanes and famine affecting billions roughly at the same time.
- samatman 3y agoThat escalated quickly.
- philipswood 3y agoOn the dangers of reading and writing: > ... And now, since you are the father of writing, your affection for it has made you describe its effects as the opposite of what they really are. In fact, it will introduce forgetfulness into the soul of those who learn it: they will not practice using their memory because they will put their trust in writing, which is external and depends on signs that belong to others, instead of trying to remember from the inside, completely on their own. You have not discovered a potion for remembering, but for reminding; you provide your students with the appearance of wisdom, not with its reality. Your invention will enable them to hear many things without being properly taught, and they will imagine that they have come to know much while for the most part they will know nothing. And they will be difficult to get along with, since they will merely appear to be wise instead of really being so.” Note that the criticism is mostly spot on! I spend some time in an internet forum where memory athletes hang out and you'd be surprised at what the human ability to remember can actually be. This is from Phaedrus by Plato. There are a few extra observations in the following text that nicely seems applicable to LLMs https://conversational-leadership.net/myth-of-thamus-and-theuth/ https://conversational-leadership.net/myth-of-thamus-and-the...
- reasonabl_human 3y agoWhat forum are you referring to?