Show HN: Document Q&A with GPT: web, .pdf, .docx, etc. (klavier.ai)
Hello fellow hackers,
we made a site that gets GPT to answer your question using the info on a webpage you specify or document you upload (e.g., a large textbook .pdf file).
Background: When ChatGPT came out, I had the idea of having it pull answers from my stereo receiver's annoyingly dense 32 page manual. My weekend project prototype proceeded to surprise with great answers—just like what we've all experienced by now. My co-founder thought we should productize it, and make it easy to use online. So here we are with a very early beta! (Try it on a HN thread...)
81 comments
[ 87.7 ms ] story [ 490 ms ] threadSo I uploaded a desert recipe and noticed there is no formatting to the answer text. It is one big paragraph.
Other than that, the idea is great, but I got more "I don't know" than anything.
I didn't save the exact answer, but it was along the lines of; "the prompt provided only says - document not loaded, please enable JavaScript and cookie's"
Here's the full text in reverse-chronological order:
------
> By what measure is it popular? >> I don't know.
> Is neverthrow a popular npm library? >> Yes, neverthrow is a popular npm library. It is a fully-tested and type-checked npm package that provides type-safe error handling in TypeScript. It is designed to help users encode failability into the typesystem and provide a friendly API that lets them deal with failable values in a safe way.
> How do I install the neverthrow package? >> To install the neverthrow package, you can use the npm package manager. In your terminal, run the command `npm install neverthrow` and the package will be installed.
> What is typescript? >> TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. It offers classes, modules, and interfaces to help you build robust components. TypeScript is designed for development of large applications and transcompiles to JavaScript.
> What is this blog post about? >> This blog post is about type-safe error handling in TypeScript, and how to encode failability into the typesystem using the Result type. It explains how to use the neverthrow package to create a Result type, and how to use the map and mapErr methods to handle success and failure cases.
> Enter a URL to read: >> https://gdelgado.ca/type-safe-error-handling-in-typescript
Given your comment we are going to consider retaining question history (or offer an option to do so)!
Edit: I tried this one with an 800kb .txt and after digesting it, it got two answers wrong (but at least related to the text) and then started spitting out "I don't know". I asked "what is this document?" because I saw with my previous test that it can get blocked and be working with a 404 page ("this document is a page that says suspicious activity request denied") but this time it just said "I don't know."
Not sure which version Bing uses (I’d guess the smaller), but GPT-4 has either an 8K token or 32K token context (prompt + response) space, some of which is taken up by the hidden system prompt, but that limit is also there using the model through the API.
- Bing isn't using the layer right - it can search the whole internet to orchestrate context for itself but doesn't seem set-up to so search one doc
- OP app seems to crash after a while
- the third service i forget the name of which has been shown on here (something to do with 'pdf') similarly to Bing doesn't 'search around' in long documents appropriately
Our site is meant for Q&A, and has a layer of tech that finds the sections in the large document that are relevant to the Q first. This will not work well in general for summarization on unstructured content. But most content tends to be structured and in practice we are finding that the approach still works on e.g. news articles, wikipedia articles, blog posts. It's almost as if where it doesn't work, a human would have trouble too. (e.g., on a long rambling HN thread).
Yes.
Internally, it has the same privileges as a third party extension with webpage content access, so it cannot access the pdf viewer contents. I believe Edge is getting a new PDF viewer in Canary that might solve this. For now, you can select text 2000 characters at a time and send to chat or give it a URL (assuming that Bing can see it in the search index).
Bing chat is already good at handling recursive queries (with internet access) and processing poorly formatted PDFs from the indexer webcache, so I assume it would do well given the right conditions. It does Q&A really well on GitHub repositories, for example.
We'll look into adding memory (either as a default or as an option).
The crazy thing is I fell asleep a few hours ago wondering how to feed the insurance terms and conditions to ChatGPT so that I could query them, and then I woke up and saw this.
All this AI progress opens up so many possibilities that it's almost anxiety-inducing
(And yes, I feel the anxiety too--to keep up with what people are doing with the tech!)
What about adding my ebook library, and asking questions against it , would there be some way to do that ?
My query was: How many red numbers are shown in this document?
It said: "I don't know."
...I'm going to keep playing with it =]
There's definitely an enterprise use-case for this.
First question: are there other tools that do this with ChatGPT? carrolldunham says that Bing can do it. But still?
Second question: what are your plans for the future? Could we integrate your tool into a website, with a pre-made list of documents and web pages, and our members, or customers, can use the tool to get answers? And if I look further, could we imagine a similar tool to answer questions received by email?
Third question: the tool works with French documents, do you intend to translate the interface?
Thank you!
2: We are thinking of the website integration. Do you think OpenAI may release this too? Questions received by email is a new idea that sounds interesting!
3: Thanks for the suggestion – we will look into it.
For the past few months I have been looking for a way to free up staff time to answer the same questions over and over again because our members and customers don't read our documents and website. There is no added value in having employees answer questions like these.
Your tool has a huge added value: instant response for the member or client, time I can invest elsewhere from these employees to do project development.
Fourth question: do you plan to be able to process an entire website, for example with its sitemap? Or is it page by page?
Thank you!
And given your explanation of your usecase, this feature looks more compelling to build out. Would you consider messaging me (email in my profile)? We'd love to chat, and maybe roll out a solution for you as a pilot customer.
We are using a scraper for HTML and parsing docs in Node.js.
The tough part for us is normalizing all of the data and working with various file types and encodings.
You can try it out for free here.
https://chatterdocs.ai/studio
I am actually interested in creating such a chat dedicated to one product as a example / hobby project -- any pointers appreciated on where I can start, and what already implemented opensource solutions I can leverage for quick results. Thanks!
https://github.com/mpaepper/content-chatbot
1) Allow it to take a search term, do a web search and allow the user to select from those results.
2) Allow it to look at more than one document.
3) Detect if the output contains math formulas/graphs and render them. (or allow me to write a javascript post processor so I can add that logic myself)
4) When a user question can't be answered, prompt the user to allow your system to web search and then include those documents.
5) Create a version that can be run locally for those of us with private data. You should charge a lot for that version (~$100+k if the customer provides the hardware, and $1m+ if you have to provide the hardware (blackbox)).
6) Detect research papers and read the citations. You may have to ask the user for a SSO key to get the citations from paywalled sites.
7) Abstract responses need to be made more concrete. See if you can train the model to provide an example or describe the purpose or intuition when it responds.