SlideShare a Scribd company logo
1 of 22
Embodied methods for quick and
accurate insights about documents using
LLMs
Ben Goosman
About Me
Me: Ben Goosman
Picture credit Weidong Yang
Picture credit Piper Werle
Problem
Documents take a long time to read
Easy to get lost in the details
LLMs hallucinate
Lack of trust in AI
Solution
Don’t rely completely on the AI
Involve the human in as many steps as possible
Knowledge Map, not Knowledge Graph
Why Map?
Methods
- Generating
- Infrastructure for bulk document analysis
- Knowledge map with the POLE model
- Make the LLM explain itself
- Provide definitions to the LLM
- Use examples to get desired output
- Allow human to change query
- It’s ok not to label everything
- At first, observations are nodes, not edges
- Use shortcut
- Exploring
- Neo4j Full Text search
- Apply Force Layout in 2d and 3d
- Find central nodes
- Use path finding
- Zoom in and read
- Expand using Cypher
- Question answering with the graph
- Find relevant documents
- Find relevant knowledge map
Infrastructure for bulk document analysis
Knowledge map with the POLE model
Find relationships involving entities of types
{labels} in the text provided.
A relationship has a Source, Target,
Explanation as to why these are in relation, and
a Short relationship.
One of the Source or Target can be of a type
not in the list {labels}, but not both.
The definitions are {str(definitions)}. If there are
no relationships, don't say anything.
Some examples of your output are below.
Make the LLM explain itself
See: Chain of Thought reasoning
Explanation: Lily lived in the village nestled
in the mountains.
Short: LIVED_IN
Provide definitions to the LLM
definitions = {
"Person": "An individual human being. This can include but is not limited to information about their name, age, gender,
occupation, nationality, and relationships.",
"Organization": " A structured body of people with a particular purpose, especially a business, society, association, etc. This can
include elements such as its name, founders, founding date, purpose, key people, and locations.",
"Location": "A specific place or position. This includes geopolitical places like countries, cities, and towns, or smaller, specific
places like buildings or landmarks. Information can cover elements such as its name, geographical coordinates, population, and
relevant features.",
"Event": "An occurrence of interest happening at a particular place and time. It can be historical, current, or future. It usually
involves people or organizations, and takes place at a specific location. Information can include elements such as its name, date,
location, participants, purpose, and outcomes.",
}
Use examples to get desired output
Your task is to generate {example_count} few-shot examples to train an LLM to identify
the relationships between entities of types {labels} in a text in order to create a
Knowledge Graph. The few-shot examples should have the following structure, but
adapted for the entities and relationships in question. The definitions of the types are
{str(definitions)}. Follow the example format below where each relationship has a
Source, Target, Explanation, and Short.
Source: Bruno Pusterla | Person
Target: Italian Agricultural Confederation | Organization
Explanation: Bruno Pusterla is a top official of the Italian Agricultural Confederation.
Short: WORKS_FOR
Allow human to change query
Find relationships matching the
given query, in the text provided.
Follow the example format. Each
relationship must have a Source,
Target, Explanation, and Short. If
there are no matches, don't say
anything.
It’s ok not to label everything
Focus on a few labels at a time, and label
everything else “Entity”
At first, observations are nodes, not edges
Simplify the graph
Neo4j Full Text search
Apply Force Layout in 2d and 3d
Find Central Nodes
Use a centrality measure
like PageRank
Zoom in and read
Expand using Cypher
Question answering with the graph
Question answering with the graph
Thank you and Questions

More Related Content

More from Neo4j

More from Neo4j (20)

UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaUNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
 
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
 
From Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptxFrom Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptx
 
Novo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNovo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMs
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
QIAGEN: Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
QIAGEN: Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansQIAGEN: Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
QIAGEN: Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
ISDEFE - GraphSummit Madrid - ARETA: Aviation Real-Time Emissions Token Accre...
ISDEFE - GraphSummit Madrid - ARETA: Aviation Real-Time Emissions Token Accre...ISDEFE - GraphSummit Madrid - ARETA: Aviation Real-Time Emissions Token Accre...
ISDEFE - GraphSummit Madrid - ARETA: Aviation Real-Time Emissions Token Accre...
 
BBVA - GraphSummit Madrid - Caso de éxito en BBVA: Optimizando con grafos
BBVA - GraphSummit Madrid - Caso de éxito en BBVA: Optimizando con grafosBBVA - GraphSummit Madrid - Caso de éxito en BBVA: Optimizando con grafos
BBVA - GraphSummit Madrid - Caso de éxito en BBVA: Optimizando con grafos
 
Graph Everywhere - Josep Taruella - Por qué Graph Data Science en tus modelos...
Graph Everywhere - Josep Taruella - Por qué Graph Data Science en tus modelos...Graph Everywhere - Josep Taruella - Por qué Graph Data Science en tus modelos...
Graph Everywhere - Josep Taruella - Por qué Graph Data Science en tus modelos...
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
 
Neo4j_Exploring the Impact of Graph Technology on Financial Services.pdf
Neo4j_Exploring the Impact of Graph Technology on Financial Services.pdfNeo4j_Exploring the Impact of Graph Technology on Financial Services.pdf
Neo4j_Exploring the Impact of Graph Technology on Financial Services.pdf
 
Rabobank_Exploring the Impact of Graph Technology on Financial Services.pdf
Rabobank_Exploring the Impact of Graph Technology on Financial Services.pdfRabobank_Exploring the Impact of Graph Technology on Financial Services.pdf
Rabobank_Exploring the Impact of Graph Technology on Financial Services.pdf
 
Webinar - IA generativa e grafi Neo4j: RAG time!
Webinar - IA generativa e grafi Neo4j: RAG time!Webinar - IA generativa e grafi Neo4j: RAG time!
Webinar - IA generativa e grafi Neo4j: RAG time!
 
IA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG timeIA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG time
 
Neo4j: Data Engineering for RAG (retrieval augmented generation)
Neo4j: Data Engineering for RAG (retrieval augmented generation)Neo4j: Data Engineering for RAG (retrieval augmented generation)
Neo4j: Data Engineering for RAG (retrieval augmented generation)
 

Recently uploaded

Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
FIDO Alliance
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 

Recently uploaded (20)

Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development Companies
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Navigating the Large Language Model choices_Ravi Daparthi
Navigating the Large Language Model choices_Ravi DaparthiNavigating the Large Language Model choices_Ravi Daparthi
Navigating the Large Language Model choices_Ravi Daparthi
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdfFrisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
 

Embodied Methods for Quick and Accurate Insights About Documents Using LLMs

  • 1. Embodied methods for quick and accurate insights about documents using LLMs Ben Goosman
  • 2. About Me Me: Ben Goosman Picture credit Weidong Yang Picture credit Piper Werle
  • 3. Problem Documents take a long time to read Easy to get lost in the details LLMs hallucinate Lack of trust in AI
  • 4. Solution Don’t rely completely on the AI Involve the human in as many steps as possible Knowledge Map, not Knowledge Graph Why Map?
  • 5. Methods - Generating - Infrastructure for bulk document analysis - Knowledge map with the POLE model - Make the LLM explain itself - Provide definitions to the LLM - Use examples to get desired output - Allow human to change query - It’s ok not to label everything - At first, observations are nodes, not edges - Use shortcut - Exploring - Neo4j Full Text search - Apply Force Layout in 2d and 3d - Find central nodes - Use path finding - Zoom in and read - Expand using Cypher - Question answering with the graph - Find relevant documents - Find relevant knowledge map
  • 6. Infrastructure for bulk document analysis
  • 7. Knowledge map with the POLE model Find relationships involving entities of types {labels} in the text provided. A relationship has a Source, Target, Explanation as to why these are in relation, and a Short relationship. One of the Source or Target can be of a type not in the list {labels}, but not both. The definitions are {str(definitions)}. If there are no relationships, don't say anything. Some examples of your output are below.
  • 8. Make the LLM explain itself See: Chain of Thought reasoning Explanation: Lily lived in the village nestled in the mountains. Short: LIVED_IN
  • 9. Provide definitions to the LLM definitions = { "Person": "An individual human being. This can include but is not limited to information about their name, age, gender, occupation, nationality, and relationships.", "Organization": " A structured body of people with a particular purpose, especially a business, society, association, etc. This can include elements such as its name, founders, founding date, purpose, key people, and locations.", "Location": "A specific place or position. This includes geopolitical places like countries, cities, and towns, or smaller, specific places like buildings or landmarks. Information can cover elements such as its name, geographical coordinates, population, and relevant features.", "Event": "An occurrence of interest happening at a particular place and time. It can be historical, current, or future. It usually involves people or organizations, and takes place at a specific location. Information can include elements such as its name, date, location, participants, purpose, and outcomes.", }
  • 10. Use examples to get desired output Your task is to generate {example_count} few-shot examples to train an LLM to identify the relationships between entities of types {labels} in a text in order to create a Knowledge Graph. The few-shot examples should have the following structure, but adapted for the entities and relationships in question. The definitions of the types are {str(definitions)}. Follow the example format below where each relationship has a Source, Target, Explanation, and Short. Source: Bruno Pusterla | Person Target: Italian Agricultural Confederation | Organization Explanation: Bruno Pusterla is a top official of the Italian Agricultural Confederation. Short: WORKS_FOR
  • 11. Allow human to change query Find relationships matching the given query, in the text provided. Follow the example format. Each relationship must have a Source, Target, Explanation, and Short. If there are no matches, don't say anything.
  • 12. It’s ok not to label everything Focus on a few labels at a time, and label everything else “Entity”
  • 13. At first, observations are nodes, not edges
  • 15. Neo4j Full Text search
  • 16. Apply Force Layout in 2d and 3d
  • 17. Find Central Nodes Use a centrality measure like PageRank
  • 18. Zoom in and read
  • 22. Thank you and Questions

Editor's Notes

  1. Not trying to be WikiData Compromise between Knowledge Graph and Mind Map
  2. More accurate results with GPT-4
  3. “Chain-of-thought (CoT) prompting is a technique that allows large language models (LLMs) to solve a problem as a series of intermediate steps[27] before giving a final answer. Chain-of-thought prompting improves reasoning ability by inducing the model to answer a multi-step problem with steps of reasoning that mimic a train of thought.[28][17][29] It allows large language models to overcome difficulties with some reasoning tasks that require logical thinking and multiple steps to solve, such as arithmetic or commonsense reasoning questions.[30][31][32]” https://en.wikipedia.org/wiki/Prompt_engineering
  4. Observation nodes create separation in the graph layout Observation nodes can be linked to the Source and Chunk Observation nodes can be skipped later
  5. Neo4j Full Text search is a good place to start