Large Language Models (LLMs) like ChatGPT has inspired the world and started a new AI revolution. However, it seems that the latest trend is supplying ChatGPT with external information to increase its accuracy and give it the ability to answer questions where the answers are not present in public datasets. In this session, Tomaz will demonstrate how using a knowledge graph as a storage object for answers gives you explicit and complete control over the answers provided by the chatbot and helps avoid hallucinations.
8. Vector similarity search
Given a question, find the most relevant documents based on a similarity metric (such as
Cosine Similarity) between vector of the question and vectors of contents.
Moving from keyword search to similarity (semantic) search.
Q: what is text
embedding?
abstractId similarity
456 0.923445
22 0.892114
… ...
Top K by similarity
9. Vector index in Neo4j - Added in 5.11
Define vector index Query vector index
10. Chat with your PDF - GenAI Stack
https://github.com/docker/genai-stack
PDF Input
User question
Generated answer
11. Chat with your PDF - GenAI Stack
https://github.com/docker/genai-stack
Neo4j LLM integrations with
LangChain and LlamaIndex can get
you started in less than 5 minutes
15. Retrieval-augmented generation flow for structured
information using generated Cypher statements
https://towardsdatascience.com/langchain-has-added-cypher-search-cb9d821120d5
20. Multi-hop question answering
Take for example the following question:
Did any of the former OpenAI employees start
their own company?
Could be broken into two sub questions:
● Who are the former employees of OpenAI?
● Did any of them start their own company?
Typical recommendation is to use vector similarity
search in combination with agents
23. Real-time analytics with
knowledge graph
Take for example the following question:
How many new customers we had last week?
Which services depend indirectly on the
authorization service?
Vector similarity search doesn’t natively
handle aggregations, transformation,
graph analytics, etc…
However, a graph database like Neo4j
offers a vast possibility of traditional and
graph analytics through the use of the
graph-based structured query language
Cypher and Graph Data Science plugin