top | item 35424005

Show HN: Unriddle – Create your own GPT-4 on top of any document

29 points| naveedjanmo | 2 years ago |unriddle.ai

51 comments

order

superkuh|2 years ago

All these "your own GPT4" and the like should really not have "own" in the description. They are just someone else using another someone else's API. A better title might be, "Use our wrapper for openai's GPT4 service to summarize documents."

ithkuil|2 years ago

I want to use somebody else's gpt-4 API token because I don't have gpt-4 API access.

I asked for whitelist access, didn't get it yet and now I won't get it because my country banned openai an openai closed my pro account.

jrm4|2 years ago

"Leverage the power of GPT4 to" something something something sounds nice and advertisey?

naveedjanmo|2 years ago

Thanks for the feedback. I get your point but with Unriddle users curate information for the index that sits on top of GPT-4. It's just one doc for now but in the future it will be multiple - this curation of info sources is where the "own" part comes in.

tablatom|2 years ago

As an LLM novice, can someone explain what these "your document" apps are doing? My understanding is that GPT-4 doesn't support fine-tuning, and 50MB is too large to add to the prompt (which would be too expensive anyway).

naveedjanmo|2 years ago

Hey! I'm the developer of Unriddle - it works using text embeddings. The document is split into small chunks and each chunk is assigned a numerical representation, or "vector", of its semantic meaning and relation to the other chunks. When a user prompts this too is assigned a vector and then compared to the rest of the chunks. The similar chunks are then fed into GPT-4 along with the query, ensuring the total number of words doesn't exceed the context window limit.

oneshoe|2 years ago

Simply speaking - They chunk the document (make it smaller so that it can be sent to gpt) and then vectorize it (change it to numbers / vector array). From there that is stored in a vector store - now, when you query you first query your vector store for the context (part of the 50MB file) and then send the context along with the question to GPT.

You are right GPT-4 doesn't support fine-tuning but, I think (in general) people might be misunderstanding what fine-tuning does.

vagabund|2 years ago

I've never had these retrieval demos work well. Either the LLM hallucinates content that could plausibly be in the document, or it's `reasoning` is so hamstrung by the constraint that it misunderstands the meaning of the specific quote it's referencing.

I just tried this one on the NBA CBA, which I would think is an ideal use case, and it didn't answer a single question correctly. Hopefully we find a more clever way to use LLMs in conjunction with a knowledge-base.

freediver|2 years ago

Can you share the link you used and a few questions/correct answers?

rnosov|2 years ago

A question to the author. Can you perform an ablation study with respect to the chunks? In other words, if you put in the context irrelevant/random chunks from the document would the quality of answers decrease/stay similar?

Potential issue might be that chunks just serve to activate massive knowledge of GPT4 and not actually used as a basis for an answer. For example, GPT4 has surely seen Dune in its training corpus and could be answering from memory.

naveedjanmo|2 years ago

This is an interesting idea. I'll have a think about a way to start measuring it. In Unriddle, any responses given that aren't drawn from the document are prefaced with a message to that effect. The bot usually says something like "I appreciate your curiosity about [query], but as an AI assistant, my primary focus is to provide advice on [document description]."

gigel82|2 years ago

I'm looking for a more holistic solution that "understands" the entirety of a book (let's say fiction to drive the point) and can "reason" about character arcs / action evolution throughout the entire narrative.

There are lots of solutions using embeddings which basically boil down to a text search and picking some number of sentences / paragraphs around the search results to construct a "context", which may work with a limited set of technical / non-fiction documents but is otherwise of narrow use.

itsaquicknote|2 years ago

Hey Naveed, this is a great project well done. I'm curious about the summarisation of longform content. You mention that you're using Langchain - are you using the MapReduce approach for documents that exceed the 32k context window, or some other approach? 600 pages at ~500 words/tokens a page would mean about $20 to mapreduce through a big doc, which seems crazy especially if you iterate on those 'summary' prompts. Or are you using embeddings for everything including summary prompts?

TheLoafOfBread|2 years ago

I believe that those chatbots would be a great solution for Reference Manuals / User manuals for microcontrollers. Those documents usually have thousands of pages (less than 10000) sometimes logically and sometimes absurdly illogically sorted.

But those tools are severely limited on maximum amount of pages. This tool has max 300 pages. ChatPDF (or how it was named) has limit on 2000 pages in paid version. So I will need to wait until those models are more available.

miketery|2 years ago

Is there any progress on the llama front where I can use that model and update / train it against my data? (I.e. all self hosted)

eulercoder|2 years ago

Hey, this looks amazing!

I couldn’t find any information about pricing? This is going to be a free tool?

naveedjanmo|2 years ago

Thanks! It's free to use for now and will always be at least partially free :)

hacker79|2 years ago

I am assuming you are calling openai API - which requires to pay based on tokens. Whats your business model since all the users are unpaid users?

Do you maintain the costs from ADs? Do you charge users?

Thank you

naveedjanmo|2 years ago

I'm just exploring whether or not it's useful. If people continue using it and/or it evolves into something more useful, I'll likely charge a monthly fee for access to certain features (e.g. longer pdfs, merging multiple pdfs into one bot, having multiple bots). The plan is to keep it partially free though

printvoid|2 years ago

Does it a accept only pdf docs at the moment? What's the maximum size of pdf file that I can provide it to analyze without breaking it.

naveedjanmo|2 years ago

Yeah it's only pdfs for now. What other file types did you want to try? Max file size is 600 pages/50 mbs

generalizations|2 years ago

Is the software used for vectorizing the documents also an API, or is that open-source?

naveedjanmo|2 years ago

There's an OpenAI API for vectorizing which I'm accessing through the Langchain library :)

serjester|2 years ago

Does not work for me.