4 ms·
It’s much easier to run searches and insert snippets from high-ranking results into the query. There are limitations to this approach, though. For example, how
by mrtranscendence 3y ago
It’s much easier to run searches and insert snippets from high-ranking results into the query. There are limitations to this approach, though. For example, how would you summarize a document this way? You’ll get snippets but not the whole picture.
I’ve also found that GPT-4 tends to hallucinate when I ask a question but the search process doesn’t result in a good match. Like making up an author or title for a document I’m asking about.
- beoberha 3y agoI have a very surface level knowledge of all this stuff, but this is what I would think would happen as well. Seems like a fairly lossy process that might work for “point lookup” questions but not “range scans” like summarizing.
- simonw 3y agoNot sure I understand your point about summarizing a document. If you want to summarize a document and it's less than 16,000 tokens, you pipe it into gpt-3.5-turbo-16k. If it's less than 32,000 and you can afford the cost, you pipe it into gpt-4-32k. Hallucination continues to be a problem, though GPT-4 is massively less prone to it than 3.5. My instinct right now is that you can resolve a lot of that problem for the Q&A case using additional careful prompt engineering, but I don't yet have a recipe I'm 100% confident in myself.
- mrtranscendence 3y ago> If you want to summarize a document and it's less than 16,000 tokens, you pipe it into gpt-3.5-turbo-16k. If it could fit within the context length then you wouldn’t need to search it to find relevant portions at all. I’m talking about situations where you want to ask questions about a very long document, using the search approach, and one of those questions might be “please summarize chapters 2 through 8”. The search method will never accommodate that, but a model fine tuned on your data might plausibly.
- bbor 3y agoplease summarize chapters 2 through 8 This really isn't related to search since it's "summarize this whole text" instead of any specific subset, but in general, I find the old ML advice of "how would a human expert do this task?" to be very helpful. This would be simple in a number of ways - consider two naive ones off the top of my head: - Iterative: Read and summarize one `MAX_INPUT_TOKENS - SUMMARY_LENGTH` section at a time, adding to your summary as you go along. The sections could be meaningful like chapters, or just arbitrary sets of paragraphs, depending on the context. - Intentful: Intuit a context-appropriate set of questions to ask about the text, use semantic search to find and summarize the answers to those, then clean up all the separate answers into one cohesive one. If your summary is getting too long to consider at once for meta-summaries, just add more layers of the above algos. I.e. combine summaries in a bracket of sorts rather than adding on to a single heap, or search for the relevant parts of the summary to tweak based on a given block of new content. Ultimately, yeah, one inference will only be able to understand as much information as it can fit in its context window. So if you want it to write a novel while holding every word in the novel up to that point in its head at once with equal weight, that's going to be hard. But a) context windows are getting longer b) I have never once seen fine-tuning give that level of context-specific accuracy - it is a language model after all, not a knowledge model! and c) that's kinda a lot to ask. Could a human even do that? Hope that rant has some interesting parts :)