7 ms·
Fixing Hallucination with Knowledge Bases
- aaron695 3y ago[dead]
- deleted 3y ago[deleted]
- frakt0x90 3y agoI posed a similar question to a postdoc at CSAIL. Namely that generative image models like DALL-E consistently screw up the number of eyes and fingers. I wondered if you could use a knowledge graph in conjunction with the drawing algorithm to imbue more realism into the generation. At the time they said they weren't aware of research in that direction. Fair enough. Still interested in seeing if these purely generative models can reference knowledge and apply it.
- thomastjeffery 3y agoWhat is a finger? What is two? These categories don't exist. Categories don't exist.
- leansensei 3y agoThey don't exist but try navigating life without them.
- thomastjeffery 3y agoI was being vague, but I meant those questions in the context of an ML model. ML models are completely inference-based. They have zero symbolic definitions. They don't categorize subjects at all. Because of that, you can't tell a model how many X to draw.
- losteric 3y agoGenerally, the models seem to struggle with fine details that correlate with broader features. Each finger typically looks ok, it's the hand that's off... remote controls might have appropriately detailed buttons with a nonsense layout. I wonder if the training process can "weight" various visual features instead of optimizing loss equally over the whole image.
- IIAOPSW 3y agoYou're close, but there's something even more fundamentally wrong that goes overlooked. The noise model. Namely the use of gausssian random pixel flips. The spectrum of the noise distribution exactly gets in the way of the fine details before there's any chance to learn it. There's no chance for it to learn the layout of TV remote buttons because in the first iteration of the diffusion there's already noise of the same length scale as the buttons you want it to learn.
- fzliu 3y agoHuman features such as faces and fingers are easy for us humans to parse because our attention is instantly drawn to them, and we are highly sensitive to "noise" for that particular domain. AI-generated content of a three-toed animal, for example, that is pictured with four toes might slip a lot of people's minds. I unfortunately don't see how vector database would be able to help with this. The knowledge bases that they provide are meant to enable large-scale retrieval and vector search. One way to fix the problem you mention is perhaps to increase the proportion of features that draw human attention (e.g. faces) in the training dataset.
- reaperman 3y ago> faces and fingers are easy for us humans to parse because... because we have dedicated neural hardware for faces -- the "fusiform face area", a relatively small volume of the brain which is used by non-autistic humans for facial recognition/processing. A lot of our sensitivity to human faces is neural structure that's in our DNA, and yes that does pair with a lifelong obsession over human faces to spend huge amounts of energy learning more about them. But after infant brain development we're not relying on a blank slate for human faces. > One case study of agnosia provided evidence that faces are processed in a special way. A patient known as C. K., who suffered brain damage as a result of a car accident, later developed object agnosia. He experienced great difficulty with basic-level object recognition, also extending to body parts, but performed very well at recognizing faces. A later study showed that C. K. was unable to recognize faces that were inverted or otherwise distorted, even in cases where they could easily be identified by normal subjects. This is taken as evidence that the fusiform face area is specialized for processing faces in a normal orientation.
- 35mm 3y agoIs it known what autistic people use it for? Different for each person?
- skybrian 3y agoIt seems like generative image generators can’t count very well and we notice whenever the number of something is supposed to be fixed. They also screw up the black keys on a piano.
- jfghi 3y agoRant, I think the usage of the term hallucination in this context is entirely too anthropomorphic.
- klysm 3y agoThese models are going to be anthropomorphized to death. It’s great marketing
- thomastjeffery 3y agoGoing to be?
- nomel 3y agoWhat would you see as a better term/phrase?
- rolodato 3y agoBugs, faults, errors
- jfghi 3y agoNot sure as I’m not yet familiar enough with the types of errors occurring. I do think a somewhat more accurate and possibly technical set of terms would be more useful for discussions about it though than hallucination.
- jameshart 3y agoThey're not errors. These are token prediction models. Their token predictions are accurate, insofar as the probabilities of those tokens in those sequences being representative of the kind of thing they were trained on. Is it plausible that a document exists that explains that George Washington was actually an amateur magician? How is a GPT model to know that that is not the document it is predicting the next tokens for? Why wouldn't it explain that he used to perform for children's parties, and do tricks involving making doves and rabbits appear?
- Ozzie_osman 3y agoUsing vectors for retrieval augmentation seems really powerful at first, but in practice we've found it very finicky. How long should each chunk be? How should you split? Are vector embeddings actually a good space/distance for your domain? One improvement is to use refinement (ie iterate over many relevant chunks, refining your answer). This is more expensive and slower but less lossy than vectors. LlamaIndex does refinement well. Would be curious if people have found better patterns. We've been playing around with using one LLM chain to do the retrieval, then passing the retrieved chunks into the main LLM call. Seems to work better for certain contexts.
- lacasito25 3y agoThere's the REMO framework, from daveshap, but I've yet to try that algorithm.
- tmaly 3y agoThere was an open source vector database that was suppose to be an alternative to pinecone that was mentioned a few weeks back. I can’t seem to find it. Does anyone recall the name?
- Xeophon 3y agoPopular examples are Weaviate and Qdrant
- colordrops 3y agoPgvector for postgres and vector search in Elasticsearch would be two ways to do it without adopting some new untested product.
- peter_l_downs 3y agoPotentially Chroma https://www.trychroma.com/ https://www.trychroma.com/ ?
- jn2clark 3y agoNot sure which one, but if you are after a vector search engine (not just a database) then I can recommend this https://github.com/marqo-ai/marqo https://github.com/marqo-ai/marqo. Includes inference, transformations, schema's, multi-modal search, multi-modal queries, multi-modal representations, text chunking and more.
- jn2clark 3y agoThis article also has some other methods for hallucination and reference checking by using cross-encoders https://github.com/marqo-ai/marqo/blob/mainline/examples/GPT-examples/article/article.md https://github.com/marqo-ai/marqo/blob/mainline/examples/GPT.... It is not perfect but can be easily modified to make it more robust.
- fzliu 3y agoMilvus (https://milvus.io https://milvus.io) and Vespa (https://vespa.ai https://vespa.ai) are great choices if you're looking for hardened, scalable, and production-ready vector databases. We (Milvus) also have `milvus-lite` if you'd like something pip installable: python3 -m pip install milvus
- cco 3y agoWe tried a few different versions of this over a recent hackathon; results weren't great. Though maybe that says more about the documents that we trained it on than the approach!
- baq 3y agoThe confabulation ship probably sailed, but maybe we can still turn it around?
- skilled 3y agoAre there any memory-based projects on GitHub that I can try out myself without breaking the bank? Let's say I want to load up a documentation and simply do some queries with it and see how well it performs.
- euroderf 3y agoNobody is trying to use Cyc ?
- mfalcon 3y agoThis is just "citing the sources" of the retrieved documents or am I missing something? I was expecting to read some novel approach like Hypothetical Document Embeddings.
- crdrost 3y agoYeah it's not a novel approach, it's 1. Chunkify the knowledge database into smallish chunks, 2. When you get a question, find the chunks most similar to the question 3. Prompt the LLM to use [the found chunks] to answer [the question] If you've ever posted a question to Stack Overflow or a similar site, think about the noise reduction “these posts may be relevant to you” feature. When you're actually asking an interesting and/or open ended question, you get a looooot of false positives. That's in the nature of text similarity search, it really hinges on strong nouns and verbs to anchor the discussion. It's no coincidence that the examples given here are uncommon names like Mussolini and Ketanji. So while this is not terribly useful, it is interesting that it might severely reduce the hallucination rate, which is a sort of false positive rate. Does it only reduce the false positives for facts that it “knows” via the external database? The really interesting prompts and responses, where you ask it to answer questions about figures who do not exist or data too npew for it to have, see if it still hallucinates, would have been very nice to see in this blog post. Missed opportunity.
- littlekey 3y agoI have a couple of questions: 1. Once you use the vector embeddings to grab the most relevant chunks, are you just injecting the actual 400 (in this example) token prose text snippets into the LLM query? So under the hood does that query from the article end up as something like "Who was Benito Mussolini? Please use the following texts to inform your answer: [snippet 1, snippet 2, snippet3]"? 2. I understand the use case for knowledge that isn't cooked into the LLM because it's too recent etc., but I wonder about using it with historic knowledge. I assume all(?) LLMs would have used Wikipedia for training and would therefore already have this Mussolini information from those same articles, so what's the point of priming it with duplicate "external" information? Would that really improve accuracy?