Live data from Hacker News

Show HN: ChatGPT and Document Parser = Ghost

ghostextension.com

41–50 of 53 posts

Re: Show HN: ChatGPT and Document Parser = Ghost

#41
post #24

A better way to do this might be to use the embedding API. That allows you to upload a text corpus and to then get vectors. You can then calculate the cosign similarity for a search string on those to get relevant results of clustered text from the uploaded corpus.

I don't get why people bother with chat interface and textual prompts. The whole concept of "prompt engineering" sounds to me like a practical joke that got out of hand. It's like, imagine there's a complex machine with large panels full of buttons and levers - and then, someone covered the panels with tapestry. Beautiful tapestry, showing artistic interpretations of things mundane and holy, trivialities of everyday…

Because everyone can use text interface without knowing how to configure the low level one.

Re: Show HN: ChatGPT and Document Parser = Ghost

#42
post #27

Projects like these (using embeddings) are great, but what I'm looking for is something that can ingest an entire book (let's say a fiction book) then answer questions about the entire content (and not just by effectively doing a text search over your input, but actually "understanding" the entire contents of the book); I presume such a thing is not possible with ChatGPT (without fine-tuning), correct?

What do you think about the responses generated by this:

https://www.konjer.xyz/the-alchemist (disclaimer: built by me)

What specifically is missing from the answers in your opinion?

Re: Show HN: ChatGPT and Document Parser = Ghost

#43

This is not meant to be a critique just an open question to everyone trying it - does anyone find this to be more useful then just ctrl+f? For compiling information or getting an immediate yes/no it's likely correct - but I found ctrl+f generally gets me there faster albiet with slightly more reading. At least in the context of this lease agreement which does have everything well organized and uses carefully chosen k…

It picks up some context questions that aren't there.

Consider the example question of "I won't be able to pay until the 9th of this month, will I get a fee?" - are you going to search for "fee"? There are 66 occurrences.

Modify the question to "If I pay on the 4th of the month, will there be any late fee?" and you get the correct answer too.

For the question "What restrictions are there on parties?" it appears to get that correctly answered. If you search for "party" you'll get 19 results that appear to be legal entity parties rather than the possibly noisy type.

Re: Show HN: ChatGPT and Document Parser = Ghost

#44
post #28
post #24

A better way to do this might be to use the embedding API. That allows you to upload a text corpus and to then get vectors. You can then calculate the cosign similarity for a search string on those to get relevant results of clustered text from the uploaded corpus.

Would you mind explaining this and maybe dumbing it down? Sounds useful

You can use models (OpenAI have some, there are other open-source self-hostable ones that are better if I recall correctly) that will take a sentence or a paragraph and spit out a vector. These vectors are called 'embeddings'

You then put those vectors in a vector database (e.g. pinecone, pgvector, chroma).

To run searches, you generate an embedding of the search term (could be the raw user search, could be something a model like ChatGPT was asked to transform the user's search into), then query the vector database for the n closest vectors. The trick is getting a model that generates good vectors for search (and transforming the user's query into some text that'd be useful vector(s) to search against). If feeding that into an LLM context, the next step is making sure that you get your prompt right, and don't overload the model with unrelated information (i.e. bad search results).

The key is that the vector representation embeds language concepts in how close vectors are to one another. An easy way to gain a feel for this is to look at single-word embeddings. Computerphile have a great episode on it[1]. You can take a vector for 'King', subtract the vector for 'Man' and add the vector for 'Woman' and the closest vector in that search will likely be 'Queen'. Scale up this idea to whole paragraphs (and larger vectors as a result).

LangChain has an example of searching a database of facts[2] (although I find their documentation pretty inaccessible - they explain their library, but don't step back from inside the weeds of what they're doing to really explain why / what's going on). Many of the features LangChain implements are distilling (or sometimes simply lifting and providing a toolkit to directly apply) LLM papers.

1: Computerphile Word Embeddings https://www.youtube.com/watch?v=gQddtTdmG_8

2: https://langchain.readthedocs.io/en/latest/use_cases/questio...

Re: Show HN: ChatGPT and Document Parser = Ghost

#45
post #42
post #27

Projects like these (using embeddings) are great, but what I'm looking for is something that can ingest an entire book (let's say a fiction book) then answer questions about the entire content (and not just by effectively doing a text search over your input, but actually "understanding" the entire contents of the book); I presume such a thing is not possible with ChatGPT (without fine-tuning), correct?

What do you think about the responses generated by this: https://www.konjer.xyz/the-alchemist (disclaimer: built by me) What specifically is missing from the answers in your opinion?

That's pretty interesting but ideally, I'd be able to upload my own book (txt, pdf, epub) and interact with it. It's lacking implementation details so not sure if you use embeddings, fine tuning or a novel approach.

Re: Show HN: ChatGPT and Document Parser = Ghost

#46

Earlier quoted context omitted.

I don't get why people bother with chat interface and textual prompts. The whole concept of "prompt engineering" sounds to me like a practical joke that got out of hand. It's like, imagine there's a complex machine with large panels full of buttons and levers - and then, someone covered the panels with tapestry. Beautiful tapestry, showing artistic interpretations of things mundane and holy, trivialities of everyday…

Because everyone can use text interface without knowing how to configure the low level one.

This makes sense at the UI layer, if you're making a chatbot or an NPC for a game. But if you're at the point of prompt engineering, it makes no sense to stick to the natural language interface. It's like another iteration of the idea of "programming via conversations in natural language instead of writing code" - it sounds like it makes sense, until you realize that programming languages and the mathematics underpinning it were developed specifically because natural language is nowhere near precise enough for the job.

Or, put another way, using text/conversation as user interface in a model is turning a normal engineering problem into a much harder reverse engineering problem. Why would anyone want to make life difficult for themselves this way, and ultimately turning engineering into voodoo?

Re: Show HN: ChatGPT and Document Parser = Ghost

#47

Earlier quoted context omitted.

I don't get why people bother with chat interface and textual prompts. The whole concept of "prompt engineering" sounds to me like a practical joke that got out of hand. It's like, imagine there's a complex machine with large panels full of buttons and levers - and then, someone covered the panels with tapestry. Beautiful tapestry, showing artistic interpretations of things mundane and holy, trivialities of everyday…

>The whole concept of "prompt engineering" sounds to me like a practical joke that got out of hand. I was on a call this morning and heard someone refer to two of their team members as "Prompt Engineers" as if that were an actual role.

My impression is that the industry in aggregate is actually trying to make it into an actual role.

Which would make sense if we were talking about humanity discovering magic is real and trying to reverse engineer it based on ancient spell books[0] - but we're not. We're talking about deep learning models made by other people, using publicly available knowledge and techniques, and often with source code and training set being publicly available too. Prompt engineering feels like people purposefully trying to treat technology as magic.

--

[0] - Or any of the scenarios equivalent to it under Clarke's third law, such as finding a crashed alien starship with a working black-box AI in it, built on a computing substrate we can't even identify, much less prod with a signal generator.

Re: Show HN: ChatGPT and Document Parser = Ghost

#49
This is exactly the application I was thinking of when I first used ChatGPT. Using AI to summarize complex legal documents, and be able to ask questions about the document.

Have you thought of even larger knowledge-bases? like entire legal systems etc...

Anyway, amazingly executed, nice work!

Re: Show HN: ChatGPT and Document Parser = Ghost

#50
post #43

This is not meant to be a critique just an open question to everyone trying it - does anyone find this to be more useful then just ctrl+f? For compiling information or getting an immediate yes/no it's likely correct - but I found ctrl+f generally gets me there faster albiet with slightly more reading. At least in the context of this lease agreement which does have everything well organized and uses carefully chosen k…

It picks up some context questions that aren't there. Consider the example question of "I won't be able to pay until the 9th of this month, will I get a fee?" - are you going to search for "fee"? There are 66 occurrences. Modify the question to "If I pay on the 4th of the month, will there be any late fee?" and you get the correct answer too. For the question "What restrictions are there on parties?" it appears to ge…

I asked if I could use the rental as a foreign embassy location. It gave the reasonable answer, quoting the agreement that you could only use it as a private residence and you couldn't use it for other purposes.
Post reply on HN