Leveraging Knowledge Graphs for Agentic Workflows: A Practical Approach to Data Modeling and Querying

Unlocking the power of knowledge graphs: how integrating multiple data sources, including unstructured and structured data, enables advanced analytics, precision, and explainability in AI-driven workflows.

  • 1. Topic of the discussion: Using a graph architecture to deal with multiple data sources, both structured and unstructured, in music analysis.
  • 2. A general graph architecture consists of agents, tools, and a knowledge graph in the middle.
  • 3. The knowledge graph can extract data from documents and unstructured places, as well as handle standard ETLs for structured data.
  • 4. The purpose of having a knowledge graph is to improve accuracy, explanability, and agentic workflows.
  • 5. With a knowledge graph, agents can decompose complex questions into multiple queries and retrieve the necessary data more effectively.
  • 6. A simple data model can be expressed to help agents perform decomposition and pull information accurately.
  • 7. Additional data can be added to the knowledge graph over time to expand its capabilities.
  • 8. An example of a use case for this type of architecture is an employee graph for skills analysis, team collaboration, and identifying skill gaps.
  • 9. The employee graph can start with data from resumes in PDF format, containing professional experience and descriptions.
  • 10. Documents are loaded into the Neo4j graph database, where they are embedded and linked together.
  • 11. An agent is created using Google's ADK framework to interact with the knowledge graph and answer questions.
  • 12. The initial version of the agent may only be able to perform simple search queries, which might not provide accurate or sufficient answers for complex questions.
  • 13. To improve the data model, entity extraction can be performed on the documents to create a more expressive graph with connections between people, skills, and activities.
  • 14. The refined data model allows for more precise questions and aggregations, providing better answers for queries about technical talent distribution or finding similarities between individuals base
  • 15. Additional tools can be added to the agent to enhance its capabilities, such as using language models to generate cipher text or performing complex traversals in a graph database.
  • 16. With a more expressive data model and enhanced tools, questions can be answered with greater precision and control, allowing for better filtering, refinement, and explanations of the results.
  • 17. As new data sources become available, they can be easily added to the graph without requiring significant changes to the existing data model or schema.
  • 18. For example, internal HR data about projects and collaborations can be integrated into the graph, allowing for questions about teamwork and project-specific contributions.
  • 19. Graph databases enable flexible integration of new relationships and data types, which is particularly useful when working with agents that need to quickly adapt to changing requirements and incor
  • 20. By using a knowledge graph architecture, users can improve the accuracy, performance, and flexibility of their music analysis systems when dealing with multiple data sources.

Source: AI Engineer via YouTube

❓ What do you think? What are your thoughts on the ideas shared in this video? Feel free to share your thoughts in the comments!