Hacker News new | ask | show | jobs
by simonw 1158 days ago
The FAQ answers my question:

> In the analyzing step, ChatPDF creates a semantic index over all paragraphs of the PDF. When answering a question, ChatPDF finds the most relevant parapgrahs from the PDF and uses the ChatGPT API from OpenAI to generate an answer.

Are you using OpenAI's embeddings to implement that?

2 comments

I don't know if this would work well for a lot of technical documentation I work with, it's written in a format similar to a software program, where you constantly have to flip back and forth between many pages to clearly decode what is being said.

For a simple example, a car manual where you want to change the brakes, it probably won't tell you in the brake section how to remove the wheels. You have to look at the wheel section. And in the wheel section it won't tell you about the nuts, you have to look in the spec sheets. And the spec sheet won't have the torque, you have to look in the chapter reference.

Often times they are not nice enough to point you to the relevant sections, you just have to stumble around the manual for a long time.

Yes, I wonder if there needs to be a level of recursion to solve for this problem:

1. User enters question 2. Semantic search for relevant sections of input material 3. Prompt LLM if it needs any further context to answer the question 4. GOTO 2 5. Finish

Yes, we're using OpenAI embeddings

- Mathis from ChatPDF