Knowledge Graphs
Notes on knowledge graphs, RAG, and integrating them with LLMs for conversational applications.
Basics
Names to know in AI
- Stephen Wolfram - Founder of Wolfram Alpha, genius and AI/linguistic programming aficionado
- Andrew Ng - Co-founder of Coursera
- Daphne Koller - Co-founder of Coursera
Companies to know
Ed tech:
- https://app.mavenanalytics.io/courses
- https://hyperskill.org/
- https://en.wikipedia.org/wiki/Intelligent_tutoring_system
- Whatfix
Knowledge Graphs for RAG (retrieval-augmented generation)
https://learn.deeplearning.ai/courses/knowledge-graphs-rag/lesson/1/introduction
Integrating Knowledge Graphs into LLM-based conversational applications
Neo4j
https://neo4j.com/developer-blog/context-aware-knowledge-graph-chatbot-with-gpt-4-and-neo4j/
General flow of application:
- User prompts
- Prompt is sent to GPT 4
- GPT-4 Generates a Cypher statement
- The Cypher statement is used to query the Knowledge Graph
- Use the results from the Knowledge Graph to query GPT 3 turbo
- GPT-3 Turbo generates natural language answer
- User receives answer
Interacting with a knowledge graph (KG)
A KG is effectively two tables:
- nodes (type, name, properties)
- edges (type, node A, node B, properties)
What is LangChain?
LangChain is meant to allow you to use multiple LLMs in your application. It's an open-source orchestration framework available in JavaScript and Python.
Main components:
- LLMs - single class with single interface for any LLM
- Prompts
- Chains - chaining prompts to LLMs
- Indexes - data sources (dropbox, airtable, filesystem, databases, vector databases)
- Memory - retain conversation history or summary
- Agents - use language model as reasoning engine
What is LangGraph
https://langchain-ai.github.io/langgraphjs/