From 91f3cd9ef70cf89c63afe6e988f8b9936d8b80a6 Mon Sep 17 00:00:00 2001 From: Daniel Molnar Date: Tue, 13 May 2025 18:13:26 +0200 Subject: [PATCH] fix: notebooks (#818) ## Description ## DCO Affirmation I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin. --- notebooks/cognee_demo.ipynb | 50 +- notebooks/cognee_graphiti_demo.ipynb | 30 +- notebooks/cognee_llama_index.ipynb | 8 +- notebooks/cognee_simple_demo.ipynb | 48 +- notebooks/github_graph_visualization.html | 128 -- notebooks/graphrag_vs_rag.ipynb | 102 +- notebooks/hr_demo.ipynb | 978 --------------- .../llama_index_cognee_integration.ipynb | 19 +- notebooks/ontology_demo.ipynb | 1058 +---------------- 9 files changed, 178 insertions(+), 2243 deletions(-) delete mode 100644 notebooks/github_graph_visualization.html delete mode 100644 notebooks/hr_demo.ipynb diff --git a/notebooks/cognee_demo.ipynb b/notebooks/cognee_demo.ipynb index e1ff9a642..054c94317 100644 --- a/notebooks/cognee_demo.ipynb +++ b/notebooks/cognee_demo.ipynb @@ -467,7 +467,7 @@ "from cognee.modules.data.models import Dataset, Data\n", "from cognee.modules.data.methods.get_dataset_data import get_dataset_data\n", "from cognee.modules.cognify.config import get_cognify_config\n", - "from cognee.modules.pipelines.tasks.Task import Task\n", + "from cognee.modules.pipelines.tasks.task import Task\n", "from cognee.modules.pipelines import run_tasks\n", "from cognee.modules.users.models import User\n", "from cognee.tasks.documents import (\n", @@ -505,7 +505,7 @@ " Task(add_data_points, task_config={\"batch_size\": 10}),\n", " ]\n", "\n", - " pipeline_run = run_tasks(tasks, dataset.id, data_documents, \"cognify_pipeline\")\n", + " pipeline_run = run_tasks(tasks, dataset.id, data_documents, user, \"cognify_pipeline\")\n", " pipeline_run_status = None\n", "\n", " async for run_status in pipeline_run:\n", @@ -529,8 +529,11 @@ "source": [ "from cognee.modules.users.methods import get_default_user\n", "from cognee.modules.data.methods import get_datasets_by_name\n", + "from cognee.modules.users.methods import get_user\n", "\n", - "user = await get_default_user()\n", + "default_user = await get_default_user()\n", + "\n", + "user = await get_user(default_user.id)\n", "\n", "datasets = await get_datasets_by_name([\"example\"], user.id)\n", "\n", @@ -604,39 +607,6 @@ "visualization_server(port=8002)" ] }, - { - "cell_type": "code", - "execution_count": null, - "id": "765bc42a143e98af", - "metadata": { - "ExecuteTime": { - "end_time": "2025-02-09T21:46:07.783693Z", - "start_time": "2025-02-09T21:46:07.780709Z" - } - }, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "e1382358-433c-4cd0-8535-9e103f821034", - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "6332d5bc-882f-49d5-8496-582e3954567a", - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import IFrame, display, HTML\n", - "\n", - "IFrame(\"http://127.0.0.1:8002/.artifacts/graph_visualization.html\", width=800, height=600)" - ] - }, { "cell_type": "code", "execution_count": null, @@ -837,14 +807,6 @@ "### Give us a star if you like it!\n", "https://github.com/topoteretes/cognee" ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "3c081f2d53512199", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/notebooks/cognee_graphiti_demo.ipynb b/notebooks/cognee_graphiti_demo.ipynb index 7759b896f..79123a483 100644 --- a/notebooks/cognee_graphiti_demo.ipynb +++ b/notebooks/cognee_graphiti_demo.ipynb @@ -15,7 +15,7 @@ } }, "source": [ - "First we import the necessary libaries" + "First we import the necessary libraries" ] }, { @@ -24,9 +24,10 @@ "metadata": {}, "outputs": [], "source": [ + "import asyncio\n", + "\n", "import cognee\n", "from cognee.shared.logging_utils import get_logger, ERROR\n", - "import warnings\n", "from cognee.modules.pipelines import Task, run_tasks\n", "from cognee.tasks.temporal_awareness import build_graph_with_temporal_awareness\n", "from cognee.infrastructure.databases.relational import (\n", @@ -38,7 +39,8 @@ "from cognee.modules.retrieval.utils.brute_force_triplet_search import brute_force_triplet_search\n", "from cognee.modules.retrieval.graph_completion_retriever import GraphCompletionRetriever\n", "from cognee.infrastructure.llm.prompts import read_query_prompt, render_prompt\n", - "from cognee.infrastructure.llm.get_llm_client import get_llm_client" + "from cognee.infrastructure.llm.get_llm_client import get_llm_client\n", + "from cognee.modules.users.methods import get_default_user" ] }, { @@ -126,33 +128,25 @@ }, "outputs": [], "source": [ - "# πŸ”§ Setting Up Logging to Suppress Errors\n", - "logger = get_logger(level=ERROR) # Keeping logs clean and focused\n", - "\n", - "# 🧹 Pruning Old Data and Metadata\n", - "await cognee.prune.prune_data() # Removing outdated data\n", + "await cognee.prune.prune_data()\n", "await cognee.prune.prune_system(metadata=True)\n", - "\n", - "# πŸ—οΈ Creating Relational Database and Tables\n", "await create_relational_db_and_tables()\n", "\n", - "# πŸ“š Adding Text Data to Cognee\n", + "# Initialize default user\n", + "user = await get_default_user()\n", + "\n", "for text in text_list:\n", " await cognee.add(text)\n", "\n", - "# πŸ•°οΈ Building Temporal-Aware Graphs\n", "tasks = [\n", " Task(build_graph_with_temporal_awareness, text_list=text_list),\n", - "]\n", + " ]\n", "\n", - "# πŸš€ Running the Task Pipeline\n", - "pipeline = run_tasks(tasks)\n", + "pipeline = run_tasks(tasks, user=user)\n", "\n", - "# 🌟 Processing Pipeline Results\n", "async for result in pipeline:\n", - " print(f\"βœ… Result Processed: {result}\")\n", + " print(result)\n", "\n", - "# πŸ”„ Indexing and Transforming Graph Data\n", "await index_and_transform_graphiti_nodes_and_edges()" ] }, diff --git a/notebooks/cognee_llama_index.ipynb b/notebooks/cognee_llama_index.ipynb index acbed7f18..65f1b2ef0 100644 --- a/notebooks/cognee_llama_index.ipynb +++ b/notebooks/cognee_llama_index.ipynb @@ -12,7 +12,9 @@ "execution_count": null, "metadata": {}, "outputs": [], - "source": "%pip install llama-index-core\n" + "source": [ + "%pip install llama-index-core\n" + ] }, { "cell_type": "markdown", @@ -116,10 +118,10 @@ ] }, { - "metadata": {}, "cell_type": "code", - "outputs": [], "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "from typing import Union, BinaryIO\n", "\n", diff --git a/notebooks/cognee_simple_demo.ipynb b/notebooks/cognee_simple_demo.ipynb index 1b9af4ce8..f65caeeec 100644 --- a/notebooks/cognee_simple_demo.ipynb +++ b/notebooks/cognee_simple_demo.ipynb @@ -10,11 +10,13 @@ }, { "cell_type": "code", + "execution_count": null, "id": "982b897a29a26f7d", "metadata": {}, - "source": "!pip install cognee==0.1.36", "outputs": [], - "execution_count": null + "source": [ + "!pip install cognee==0.1.39" + ] }, { "cell_type": "markdown", @@ -28,15 +30,15 @@ }, { "cell_type": "code", + "execution_count": null, "id": "initial_id", "metadata": {}, + "outputs": [], "source": [ "import os\n", "\n", "os.environ[\"LLM_API_KEY\"] = \"\"" - ], - "outputs": [], - "execution_count": null + ] }, { "cell_type": "markdown", @@ -48,14 +50,14 @@ }, { "cell_type": "code", + "execution_count": null, "id": "5805c346f03d8070", "metadata": {}, + "outputs": [], "source": [ "current_directory = os.getcwd()\n", "file_path = os.path.join(current_directory, \"data\", \"alice_in_wonderland.txt\")" - ], - "outputs": [], - "execution_count": null + ] }, { "cell_type": "markdown", @@ -67,15 +69,15 @@ }, { "cell_type": "code", + "execution_count": null, "id": "875763366723ee48", "metadata": {}, + "outputs": [], "source": [ "import cognee\n", "await cognee.add(file_path)\n", "await cognee.cognify()" - ], - "outputs": [], - "execution_count": null + ] }, { "cell_type": "markdown", @@ -87,33 +89,33 @@ }, { "cell_type": "code", + "execution_count": null, "id": "29b3a1e3279100d2", "metadata": {}, + "outputs": [], "source": [ "await cognee.search(\"List me all the influential characters in Alice in Wonderland.\")" - ], - "outputs": [], - "execution_count": null + ] }, { "cell_type": "code", + "execution_count": null, "id": "883ce50d2d9dc584", "metadata": {}, + "outputs": [], "source": [ "await cognee.search(\"How did Alice end up in Wonderland?\")" - ], - "outputs": [], - "execution_count": null + ] }, { "cell_type": "code", + "execution_count": null, "id": "677e1bc52aa078b6", "metadata": {}, + "outputs": [], "source": [ "await cognee.search(\"Tell me about Alice's personality.\")" - ], - "outputs": [], - "execution_count": null + ] }, { "cell_type": "markdown", @@ -125,8 +127,10 @@ }, { "cell_type": "code", + "execution_count": null, "id": "6effdae590b795d3", "metadata": {}, + "outputs": [], "source": [ "import webbrowser\n", "import os\n", @@ -136,9 +140,7 @@ "html_file = os.path.join(home_dir, \"graph_visualization.html\")\n", "display(html_file)\n", "webbrowser.open(f\"file://{html_file}\")" - ], - "outputs": [], - "execution_count": null + ] }, { "cell_type": "markdown", diff --git a/notebooks/github_graph_visualization.html b/notebooks/github_graph_visualization.html deleted file mode 100644 index 04930ecc2..000000000 --- a/notebooks/github_graph_visualization.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/notebooks/graphrag_vs_rag.ipynb b/notebooks/graphrag_vs_rag.ipynb index 8cfb49529..035015264 100644 --- a/notebooks/graphrag_vs_rag.ipynb +++ b/notebooks/graphrag_vs_rag.ipynb @@ -1,8 +1,8 @@ { "cells": [ { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": [ "## Cognee GraphRAG\n", "\n", @@ -48,15 +48,19 @@ ] }, { - "metadata": {}, "cell_type": "code", - "source": "!pip install cognee==0.1.24", + "execution_count": null, + "metadata": {}, "outputs": [], - "execution_count": null + "source": [ + "!pip install cognee==0.1.39" + ] }, { - "metadata": {}, "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "import os\n", "import cognee\n", @@ -66,13 +70,11 @@ "\n", "if \"OPENAI_API_KEY\" not in os.environ:\n", " os.environ[\"OPENAI_API_KEY\"] = \"\"" - ], - "outputs": [], - "execution_count": null + ] }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": [ "Ensure you’ve set up your API keys and installed necessary dependencies.\n", "\n", @@ -82,19 +84,19 @@ ] }, { - "metadata": {}, "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "documents = [\"Jessica Miller, Experienced Sales Manager with a strong track record in building high-performing teams.\",\n", " \"David Thompson, Creative Graphic Designer with over 8 years of experience in visual design and branding.\"\n", " ]" - ], - "outputs": [], - "execution_count": null + ] }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": [ "### 3. Adding Data to Cognee\n", "\n", @@ -102,15 +104,17 @@ ] }, { - "metadata": {}, "cell_type": "code", - "source": "await cognee.add(documents)", + "execution_count": null, + "metadata": {}, "outputs": [], - "execution_count": null + "source": [ + "await cognee.add(documents)" + ] }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": [ "This step prepares the data for graph-based processing.\n", "\n", @@ -120,15 +124,17 @@ ] }, { - "metadata": {}, "cell_type": "code", - "source": "await cognee.cognify()", + "execution_count": null, + "metadata": {}, "outputs": [], - "execution_count": null + "source": [ + "await cognee.cognify()" + ] }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": [ "The graph now contains nodes and relationships derived from the dataset, creating a powerful structure for exploration.\n", "\n", @@ -138,45 +144,49 @@ ] }, { - "metadata": {}, "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ - "from cognee.modules.search.types import SearchType\n", - "search_results = await cognee.search(SearchType.GRAPH_COMPLETION, \"Tell me who are the people mentioned?\")\n", + "from cognee.api.v1.search import SearchType\n", + "search_results = await cognee.search(query_type=SearchType.GRAPH_COMPLETION, query_text=\"Tell me who are the people mentioned?\")\n", "\n", "print(\"\\n\\nAnswer based on knowledge graph:\\n\")\n", "for result in search_results:\n", " print(f\"{result}\\n\")" - ], - "outputs": [], - "execution_count": null + ] }, { - "metadata": {}, "cell_type": "markdown", - "source": "### Answer prompt based on RAG approach:" + "metadata": {}, + "source": [ + "### Answer prompt based on RAG approach:" + ] }, { - "metadata": {}, "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ - "search_results = await cognee.search(SearchType.COMPLETION, \"Tell me who are the people mentioned?\")\n", + "search_results = await cognee.search(query_type=SearchType.RAG_COMPLETION, query_text=\"Tell me who are the people mentioned?\")\n", "\n", "print(\"\\n\\nAnswer based on RAG:\\n\")\n", "for result in search_results:\n", " print(f\"{result}\\n\")" - ], - "outputs": [], - "execution_count": null + ] }, { - "metadata": {}, "cell_type": "markdown", - "source": "In conclusion, the results demonstrate a significant advantage of the knowledge graph-based approach (Graphrag) over the RAG approach. Graphrag successfully identified all the mentioned individuals across multiple documents, showcasing its ability to aggregate and infer information from a global context. In contrast, the RAG approach was limited to identifying individuals within a single document due to its chunking-based processing constraints. This highlights Graphrag's superior capability in comprehensively resolving queries that span across a broader corpus of interconnected data." + "metadata": {}, + "source": [ + "In conclusion, the results demonstrate a significant advantage of the knowledge graph-based approach (Graphrag) over the RAG approach. Graphrag successfully identified all the mentioned individuals across multiple documents, showcasing its ability to aggregate and infer information from a global context. In contrast, the RAG approach was limited to identifying individuals within a single document due to its chunking-based processing constraints. This highlights Graphrag's superior capability in comprehensively resolving queries that span across a broader corpus of interconnected data." + ] }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": [ "### 7. Finding Related Nodes\n", "\n", @@ -184,21 +194,21 @@ ] }, { - "metadata": {}, "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ - "related_nodes = await cognee.search(SearchType.INSIGHTS, \"person\")\n", + "related_nodes = await cognee.search(query_type=SearchType.INSIGHTS, query_text=\"person\")\n", "\n", "print(\"\\n\\nRelated nodes are:\\n\")\n", "for node in related_nodes:\n", " print(f\"{node}\\n\")" - ], - "outputs": [], - "execution_count": null + ] }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": [ "## Why Choose Cognee?\n", "\n", @@ -233,9 +243,9 @@ ], "metadata": { "kernelspec": { - "name": "python3", + "display_name": "Python 3 (ipykernel)", "language": "python", - "display_name": "Python 3 (ipykernel)" + "name": "python3" } }, "nbformat": 4, diff --git a/notebooks/hr_demo.ipynb b/notebooks/hr_demo.ipynb deleted file mode 100644 index 31111d05d..000000000 --- a/notebooks/hr_demo.ipynb +++ /dev/null @@ -1,978 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "d35ac8ce-0f92-46f5-9ba4-a46970f0ce19", - "metadata": {}, - "source": [ - "# Cognee - Get Started" - ] - }, - { - "cell_type": "markdown", - "id": "074f0ea8-c659-4736-be26-be4b0e5ac665", - "metadata": {}, - "source": [ - "# Demo time" - ] - }, - { - "cell_type": "markdown", - "id": "0587d91d", - "metadata": {}, - "source": [ - "#### First let's define some data that we will cognify and perform a search on" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "df16431d0f48b006", - "metadata": { - "ExecuteTime": { - "end_time": "2024-09-20T14:02:48.519686Z", - "start_time": "2024-09-20T14:02:48.515589Z" - } - }, - "outputs": [], - "source": [ - "job_position = \"\"\"Senior Data Scientist (Machine Learning)\n", - "\n", - "Company: TechNova Solutions\n", - "Location: San Francisco, CA\n", - "\n", - "Job Description:\n", - "\n", - "TechNova Solutions is seeking a Senior Data Scientist specializing in Machine Learning to join our dynamic analytics team. The ideal candidate will have a strong background in developing and deploying machine learning models, working with large datasets, and translating complex data into actionable insights.\n", - "\n", - "Responsibilities:\n", - "\n", - "Develop and implement advanced machine learning algorithms and models.\n", - "Analyze large, complex datasets to extract meaningful patterns and insights.\n", - "Collaborate with cross-functional teams to integrate predictive models into products.\n", - "Stay updated with the latest advancements in machine learning and data science.\n", - "Mentor junior data scientists and provide technical guidance.\n", - "Qualifications:\n", - "\n", - "Master’s or Ph.D. in Data Science, Computer Science, Statistics, or a related field.\n", - "5+ years of experience in data science and machine learning.\n", - "Proficient in Python, R, and SQL.\n", - "Experience with deep learning frameworks (e.g., TensorFlow, PyTorch).\n", - "Strong problem-solving skills and attention to detail.\n", - "Candidate CVs\n", - "\"\"\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "9086abf3af077ab4", - "metadata": { - "ExecuteTime": { - "end_time": "2024-09-20T14:02:49.120838Z", - "start_time": "2024-09-20T14:02:49.118294Z" - } - }, - "outputs": [], - "source": [ - "job_1 = \"\"\"\n", - "CV 1: Relevant\n", - "Name: Dr. Emily Carter\n", - "Contact Information:\n", - "\n", - "Email: emily.carter@example.com\n", - "Phone: (555) 123-4567\n", - "Summary:\n", - "\n", - "Senior Data Scientist with over 8 years of experience in machine learning and predictive analytics. Expertise in developing advanced algorithms and deploying scalable models in production environments.\n", - "\n", - "Education:\n", - "\n", - "Ph.D. in Computer Science, Stanford University (2014)\n", - "B.S. in Mathematics, University of California, Berkeley (2010)\n", - "Experience:\n", - "\n", - "Senior Data Scientist, InnovateAI Labs (2016 – Present)\n", - "Led a team in developing machine learning models for natural language processing applications.\n", - "Implemented deep learning algorithms that improved prediction accuracy by 25%.\n", - "Collaborated with cross-functional teams to integrate models into cloud-based platforms.\n", - "Data Scientist, DataWave Analytics (2014 – 2016)\n", - "Developed predictive models for customer segmentation and churn analysis.\n", - "Analyzed large datasets using Hadoop and Spark frameworks.\n", - "Skills:\n", - "\n", - "Programming Languages: Python, R, SQL\n", - "Machine Learning: TensorFlow, Keras, Scikit-Learn\n", - "Big Data Technologies: Hadoop, Spark\n", - "Data Visualization: Tableau, Matplotlib\n", - "\"\"\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "a9de0cc07f798b7f", - "metadata": { - "ExecuteTime": { - "end_time": "2024-09-20T14:02:49.675003Z", - "start_time": "2024-09-20T14:02:49.671615Z" - } - }, - "outputs": [], - "source": [ - "job_2 = \"\"\"\n", - "CV 2: Relevant\n", - "Name: Michael Rodriguez\n", - "Contact Information:\n", - "\n", - "Email: michael.rodriguez@example.com\n", - "Phone: (555) 234-5678\n", - "Summary:\n", - "\n", - "Data Scientist with a strong background in machine learning and statistical modeling. Skilled in handling large datasets and translating data into actionable business insights.\n", - "\n", - "Education:\n", - "\n", - "M.S. in Data Science, Carnegie Mellon University (2013)\n", - "B.S. in Computer Science, University of Michigan (2011)\n", - "Experience:\n", - "\n", - "Senior Data Scientist, Alpha Analytics (2017 – Present)\n", - "Developed machine learning models to optimize marketing strategies.\n", - "Reduced customer acquisition cost by 15% through predictive modeling.\n", - "Data Scientist, TechInsights (2013 – 2017)\n", - "Analyzed user behavior data to improve product features.\n", - "Implemented A/B testing frameworks to evaluate product changes.\n", - "Skills:\n", - "\n", - "Programming Languages: Python, Java, SQL\n", - "Machine Learning: Scikit-Learn, XGBoost\n", - "Data Visualization: Seaborn, Plotly\n", - "Databases: MySQL, MongoDB\n", - "\"\"\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "185ff1c102d06111", - "metadata": { - "ExecuteTime": { - "end_time": "2024-09-20T14:02:50.286828Z", - "start_time": "2024-09-20T14:02:50.284369Z" - } - }, - "outputs": [], - "source": [ - "job_3 = \"\"\"\n", - "CV 3: Relevant\n", - "Name: Sarah Nguyen\n", - "Contact Information:\n", - "\n", - "Email: sarah.nguyen@example.com\n", - "Phone: (555) 345-6789\n", - "Summary:\n", - "\n", - "Data Scientist specializing in machine learning with 6 years of experience. Passionate about leveraging data to drive business solutions and improve product performance.\n", - "\n", - "Education:\n", - "\n", - "M.S. in Statistics, University of Washington (2014)\n", - "B.S. in Applied Mathematics, University of Texas at Austin (2012)\n", - "Experience:\n", - "\n", - "Data Scientist, QuantumTech (2016 – Present)\n", - "Designed and implemented machine learning algorithms for financial forecasting.\n", - "Improved model efficiency by 20% through algorithm optimization.\n", - "Junior Data Scientist, DataCore Solutions (2014 – 2016)\n", - "Assisted in developing predictive models for supply chain optimization.\n", - "Conducted data cleaning and preprocessing on large datasets.\n", - "Skills:\n", - "\n", - "Programming Languages: Python, R\n", - "Machine Learning Frameworks: PyTorch, Scikit-Learn\n", - "Statistical Analysis: SAS, SPSS\n", - "Cloud Platforms: AWS, Azure\n", - "\"\"\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d55ce4c58f8efb67", - "metadata": { - "ExecuteTime": { - "end_time": "2024-09-20T14:02:50.950343Z", - "start_time": "2024-09-20T14:02:50.946378Z" - } - }, - "outputs": [], - "source": [ - "job_4 = \"\"\"\n", - "CV 4: Not Relevant\n", - "Name: David Thompson\n", - "Contact Information:\n", - "\n", - "Email: david.thompson@example.com\n", - "Phone: (555) 456-7890\n", - "Summary:\n", - "\n", - "Creative Graphic Designer with over 8 years of experience in visual design and branding. Proficient in Adobe Creative Suite and passionate about creating compelling visuals.\n", - "\n", - "Education:\n", - "\n", - "B.F.A. in Graphic Design, Rhode Island School of Design (2012)\n", - "Experience:\n", - "\n", - "Senior Graphic Designer, CreativeWorks Agency (2015 – Present)\n", - "Led design projects for clients in various industries.\n", - "Created branding materials that increased client engagement by 30%.\n", - "Graphic Designer, Visual Innovations (2012 – 2015)\n", - "Designed marketing collateral, including brochures, logos, and websites.\n", - "Collaborated with the marketing team to develop cohesive brand strategies.\n", - "Skills:\n", - "\n", - "Design Software: Adobe Photoshop, Illustrator, InDesign\n", - "Web Design: HTML, CSS\n", - "Specialties: Branding and Identity, Typography\n", - "\"\"\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "ca4ecc32721ad332", - "metadata": { - "ExecuteTime": { - "end_time": "2024-09-20T14:02:51.548191Z", - "start_time": "2024-09-20T14:02:51.545520Z" - } - }, - "outputs": [], - "source": [ - "job_5 = \"\"\"\n", - "CV 5: Not Relevant\n", - "Name: Jessica Miller\n", - "Contact Information:\n", - "\n", - "Email: jessica.miller@example.com\n", - "Phone: (555) 567-8901\n", - "Summary:\n", - "\n", - "Experienced Sales Manager with a strong track record in driving sales growth and building high-performing teams. Excellent communication and leadership skills.\n", - "\n", - "Education:\n", - "\n", - "B.A. in Business Administration, University of Southern California (2010)\n", - "Experience:\n", - "\n", - "Sales Manager, Global Enterprises (2015 – Present)\n", - "Managed a sales team of 15 members, achieving a 20% increase in annual revenue.\n", - "Developed sales strategies that expanded customer base by 25%.\n", - "Sales Representative, Market Leaders Inc. (2010 – 2015)\n", - "Consistently exceeded sales targets and received the 'Top Salesperson' award in 2013.\n", - "Skills:\n", - "\n", - "Sales Strategy and Planning\n", - "Team Leadership and Development\n", - "CRM Software: Salesforce, Zoho\n", - "Negotiation and Relationship Building\n", - "\"\"\"" - ] - }, - { - "cell_type": "markdown", - "id": "4415446a", - "metadata": {}, - "source": [ - "#### Please add the necessary environment information bellow:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "bce39dc6", - "metadata": {}, - "outputs": [], - "source": [ - "import os\n", - "\n", - "# Setting environment variables\n", - "if \"GRAPHISTRY_USERNAME\" not in os.environ:\n", - " os.environ[\"GRAPHISTRY_USERNAME\"] = \"\"\n", - "\n", - "if \"GRAPHISTRY_PASSWORD\" not in os.environ:\n", - " os.environ[\"GRAPHISTRY_PASSWORD\"] = \"\"\n", - "\n", - "if \"LLM_API_KEY\" not in os.environ:\n", - " os.environ[\"LLM_API_KEY\"] = \"\"\n", - "\n", - "# \"neo4j\" or \"networkx\"\n", - "os.environ[\"GRAPH_DATABASE_PROVIDER\"] = \"networkx\"\n", - "# Not needed if using networkx\n", - "# os.environ[\"GRAPH_DATABASE_URL\"]=\"\"\n", - "# os.environ[\"GRAPH_DATABASE_USERNAME\"]=\"\"\n", - "# os.environ[\"GRAPH_DATABASE_PASSWORD\"]=\"\"\n", - "\n", - "# \"pgvector\", \"qdrant\", \"weaviate\" or \"lancedb\"\n", - "os.environ[\"VECTOR_DB_PROVIDER\"] = \"lancedb\"\n", - "# Not needed if using \"lancedb\" or \"pgvector\"\n", - "# os.environ[\"VECTOR_DB_URL\"]=\"\"\n", - "# os.environ[\"VECTOR_DB_KEY\"]=\"\"\n", - "\n", - "# Relational Database provider \"sqlite\" or \"postgres\"\n", - "os.environ[\"DB_PROVIDER\"] = \"sqlite\"\n", - "\n", - "# Database name\n", - "os.environ[\"DB_NAME\"] = \"cognee_db\"\n", - "\n", - "# Postgres specific parameters (Only if Postgres or PGVector is used)\n", - "# os.environ[\"DB_HOST\"]=\"127.0.0.1\"\n", - "# os.environ[\"DB_PORT\"]=\"5432\"\n", - "# os.environ[\"DB_USERNAME\"]=\"cognee\"\n", - "# os.environ[\"DB_PASSWORD\"]=\"cognee\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "9f1a1dbd", - "metadata": {}, - "outputs": [], - "source": [ - "# Reset the cognee system with the following command:\n", - "\n", - "import cognee\n", - "\n", - "await cognee.prune.prune_data()\n", - "await cognee.prune.prune_system(metadata=True)" - ] - }, - { - "cell_type": "markdown", - "id": "383d6971", - "metadata": {}, - "source": [ - "#### After we have defined and gathered our data let's add it to cognee " - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "904df61ba484a8e5", - "metadata": { - "ExecuteTime": { - "end_time": "2024-09-20T14:02:54.243987Z", - "start_time": "2024-09-20T14:02:52.498195Z" - } - }, - "outputs": [], - "source": [ - "import cognee\n", - "\n", - "await cognee.add([job_1, job_2, job_3, job_4, job_5, job_position], \"example\")" - ] - }, - { - "cell_type": "markdown", - "id": "0f15c5b1", - "metadata": {}, - "source": [ - "#### All good, let's cognify it." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "7c431fdef4921ae0", - "metadata": { - "ExecuteTime": { - "end_time": "2024-09-20T14:02:57.925667Z", - "start_time": "2024-09-20T14:02:57.922353Z" - } - }, - "outputs": [], - "source": [ - "from cognee.shared.data_models import KnowledgeGraph\n", - "from cognee.modules.data.models import Dataset, Data\n", - "from cognee.modules.data.methods.get_dataset_data import get_dataset_data\n", - "from cognee.modules.cognify.config import get_cognify_config\n", - "from cognee.modules.pipelines.tasks.Task import Task\n", - "from cognee.modules.pipelines import run_tasks\n", - "from cognee.modules.users.models import User\n", - "from cognee.tasks.documents import (\n", - " check_permissions_on_documents,\n", - " classify_documents,\n", - " extract_chunks_from_documents,\n", - ")\n", - "from cognee.tasks.graph import extract_graph_from_data\n", - "from cognee.tasks.storage import add_data_points\n", - "from cognee.tasks.summarization import summarize_text\n", - "\n", - "\n", - "async def run_cognify_pipeline(dataset: Dataset, user: User = None):\n", - " data_documents: list[Data] = await get_dataset_data(dataset_id=dataset.id)\n", - "\n", - " try:\n", - " cognee_config = get_cognify_config()\n", - "\n", - " tasks = [\n", - " Task(classify_documents),\n", - " Task(check_permissions_on_documents, user=user, permissions=[\"write\"]),\n", - " Task(extract_chunks_from_documents), # Extract text chunks based on the document type.\n", - " Task(\n", - " extract_graph_from_data, graph_model=KnowledgeGraph,\n", - " task_config={\"batch_size\": 10}\n", - " ), # Generate knowledge graphs from the document chunks.\n", - " Task(\n", - " summarize_text,\n", - " summarization_model=cognee_config.summarization_model,\n", - " task_config={\"batch_size\": 10},\n", - " ),\n", - " Task(add_data_points, task_config={\"batch_size\": 10}),\n", - " ]\n", - "\n", - " pipeline = run_tasks(tasks, data_documents)\n", - "\n", - " async for result in pipeline:\n", - " print(result)\n", - " except Exception as error:\n", - " raise error" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "f0a91b99c6215e09", - "metadata": { - "ExecuteTime": { - "end_time": "2024-09-20T14:02:58.905774Z", - "start_time": "2024-09-20T14:02:58.625915Z" - } - }, - "outputs": [], - "source": [ - "from cognee.modules.users.methods import get_default_user\n", - "from cognee.modules.data.methods import get_datasets_by_name\n", - "\n", - "user = await get_default_user()\n", - "\n", - "datasets = await get_datasets_by_name([\"example\"], user.id)\n", - "\n", - "await run_cognify_pipeline(datasets[0], user)" - ] - }, - { - "cell_type": "markdown", - "id": "219a6d41", - "metadata": {}, - "source": [ - "#### We get the url to the graph on graphistry in the notebook cell bellow, showing nodes and connections made by the cognify process." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "080389e5", - "metadata": {}, - "outputs": [], - "source": [ - "import os\n", - "from cognee.shared.utils import render_graph\n", - "from cognee.infrastructure.databases.graph import get_graph_engine\n", - "import graphistry\n", - "\n", - "graphistry.login(\n", - " username=os.getenv(\"GRAPHISTRY_USERNAME\"), password=os.getenv(\"GRAPHISTRY_PASSWORD\")\n", - ")\n", - "\n", - "graph_engine = await get_graph_engine()\n", - "\n", - "graph_url = await render_graph(graph_engine.graph)\n", - "print(graph_url)" - ] - }, - { - "cell_type": "markdown", - "id": "59e6c3c3", - "metadata": {}, - "source": [ - "#### We can also do a search on the data to explore the knowledge." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "e5e7dfc8", - "metadata": {}, - "outputs": [], - "source": [ - "async def search(\n", - " vector_engine,\n", - " collection_name: str,\n", - " query_text: str = None,\n", - "):\n", - " query_vector = (await vector_engine.embedding_engine.embed_text([query_text]))[0]\n", - "\n", - " connection = await vector_engine.get_connection()\n", - " collection = await connection.open_table(collection_name)\n", - "\n", - " results = await collection.vector_search(query_vector).limit(10).to_pandas()\n", - "\n", - " result_values = list(results.to_dict(\"index\").values())\n", - "\n", - " return [\n", - " dict(\n", - " id=str(result[\"id\"]),\n", - " payload=result[\"payload\"],\n", - " score=result[\"_distance\"],\n", - " )\n", - " for result in result_values\n", - " ]\n", - "\n", - "\n", - "from cognee.infrastructure.databases.vector import get_vector_engine\n", - "\n", - "vector_engine = get_vector_engine()\n", - "results = await search(vector_engine, \"Entity_name\", \"sarah.nguyen@example.com\")\n", - "for result in results:\n", - " print(result)" - ] - }, - { - "cell_type": "markdown", - "id": "81fa2b00", - "metadata": {}, - "source": [ - "#### We normalize search output scores so the lower the score of the search result is the higher the chance that it's what you're looking for. In the example above we have searched for node entities in the knowledge graph related to \"sarah.nguyen@example.com\"" - ] - }, - { - "cell_type": "markdown", - "id": "1b94ff96", - "metadata": {}, - "source": [ - "#### In the example bellow we'll use cognee search to summarize information regarding the node most related to \"sarah.nguyen@example.com\" in the knowledge graph" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "21a3e9a6", - "metadata": {}, - "outputs": [], - "source": [ - "from cognee.api.v1.search import SearchType\n", - "\n", - "node = (await vector_engine.search(\"Entity_name\", \"sarah.nguyen@example.com\"))[0]\n", - "node_name = node.payload[\"text\"]\n", - "\n", - "search_results = await cognee.search(query_type=SearchType.SUMMARIES, query_text=node_name)\n", - "print(\"\\n\\Extracted summaries are:\\n\")\n", - "for result in search_results:\n", - " print(f\"{result}\\n\")" - ] - }, - { - "cell_type": "markdown", - "id": "fd6e5fe2", - "metadata": {}, - "source": [ - "#### In this example we'll use cognee search to find chunks in which the node most related to \"sarah.nguyen@example.com\" is a part of" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "c7a8abff", - "metadata": {}, - "outputs": [], - "source": [ - "search_results = await cognee.search(query_type=SearchType.CHUNKS, query_text=node_name)\n", - "print(\"\\n\\nExtracted chunks are:\\n\")\n", - "for result in search_results:\n", - " print(f\"{result}\\n\")" - ] - }, - { - "cell_type": "markdown", - "id": "47f0112f", - "metadata": {}, - "source": [ - "#### In this example we'll use cognee search to give us insights from the knowledge graph related to the node most related to \"sarah.nguyen@example.com\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "706a3954", - "metadata": {}, - "outputs": [], - "source": [ - "search_results = await cognee.search(query_type=SearchType.INSIGHTS, query_text=node_name)\n", - "print(\"\\n\\nExtracted sentences are:\\n\")\n", - "for result in search_results:\n", - " print(f\"{result}\\n\")" - ] - }, - { - "cell_type": "markdown", - "id": "e519e30c0423c2a", - "metadata": {}, - "source": [ - "## Let's add evals" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "3845443e", - "metadata": {}, - "outputs": [], - "source": [ - "!pip install \"cognee[deepeval]\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "7a2c3c70", - "metadata": {}, - "outputs": [], - "source": [ - "from evals.eval_on_hotpot import deepeval_answers, answer_qa_instance\n", - "from evals.qa_dataset_utils import load_qa_dataset\n", - "from evals.qa_metrics_utils import get_metrics\n", - "from evals.qa_context_provider_utils import qa_context_providers\n", - "from pathlib import Path\n", - "from tqdm import tqdm\n", - "import statistics\n", - "import random" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "53a609d8", - "metadata": {}, - "outputs": [], - "source": [ - "num_samples = 10 # With cognee, it takes ~1m10s per sample\n", - "dataset_name_or_filename = \"hotpotqa\"\n", - "dataset = load_qa_dataset(dataset_name_or_filename)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "7351ab8f", - "metadata": {}, - "outputs": [], - "source": [ - "context_provider_name = \"cognee\"\n", - "context_provider = qa_context_providers[context_provider_name]" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "9346115b", - "metadata": {}, - "outputs": [], - "source": [ - "random.seed(42)\n", - "instances = dataset if not num_samples else random.sample(dataset, num_samples)\n", - "\n", - "out_path = \"out\"\n", - "if not Path(out_path).exists():\n", - " Path(out_path).mkdir()\n", - "contexts_filename = out_path / Path(\n", - " f\"contexts_{dataset_name_or_filename.split('.')[0]}_{context_provider_name}.json\"\n", - ")\n", - "\n", - "answers = []\n", - "for instance in tqdm(instances, desc=\"Getting answers\"):\n", - " answer = await answer_qa_instance(instance, context_provider, contexts_filename)\n", - " answers.append(answer)" - ] - }, - { - "cell_type": "markdown", - "id": "1e7d872d", - "metadata": {}, - "source": [ - "#### Define Metrics for Evaluation and Calculate Score\n", - "**Options**: \n", - "- **Correctness**: Is the actual output factually correct based on the expected output?\n", - "- **Comprehensiveness**: How much detail does the answer provide to cover all aspects and details of the question?\n", - "- **Diversity**: How varied and rich is the answer in providing different perspectives and insights on the question?\n", - "- **Empowerment**: How well does the answer help the reader understand and make informed judgements about the topic?\n", - "- **Directness**: How specifically and clearly does the answer address the question?\n", - "- **F1 Score**: the harmonic mean of the precision and recall, using word-level Exact Match\n", - "- **EM Score**: the rate at which the predicted strings exactly match their references, ignoring white spaces and capitalization." - ] - }, - { - "cell_type": "markdown", - "id": "c81e2b46", - "metadata": {}, - "source": [ - "##### Calculate `\"Correctness\"`" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "ae728344", - "metadata": {}, - "outputs": [], - "source": [ - "metric_name_list = [\"Correctness\"]\n", - "eval_metrics = get_metrics(metric_name_list)\n", - "eval_results = await deepeval_answers(instances, answers, eval_metrics[\"deepeval_metrics\"])" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "764aac6d", - "metadata": {}, - "outputs": [], - "source": [ - "Correctness = statistics.mean(\n", - " [result.metrics_data[0].score for result in eval_results.test_results]\n", - ")\n", - "print(Correctness)" - ] - }, - { - "cell_type": "markdown", - "id": "6d3bbdc5", - "metadata": {}, - "source": [ - "##### Calculating `\"Comprehensiveness\"`" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "9793ef78", - "metadata": {}, - "outputs": [], - "source": [ - "metric_name_list = [\"Comprehensiveness\"]\n", - "eval_metrics = get_metrics(metric_name_list)\n", - "eval_results = await deepeval_answers(instances, answers, eval_metrics[\"deepeval_metrics\"])" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "9add448a", - "metadata": {}, - "outputs": [], - "source": [ - "Comprehensiveness = statistics.mean(\n", - " [result.metrics_data[0].score for result in eval_results.test_results]\n", - ")\n", - "print(Comprehensiveness)" - ] - }, - { - "cell_type": "markdown", - "id": "bce2fa25", - "metadata": {}, - "source": [ - "##### Calculating `\"Diversity\"`" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "f60a179e", - "metadata": {}, - "outputs": [], - "source": [ - "metric_name_list = [\"Diversity\"]\n", - "eval_metrics = get_metrics(metric_name_list)\n", - "eval_results = await deepeval_answers(instances, answers, eval_metrics[\"deepeval_metrics\"])" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "7ccbd0ab", - "metadata": {}, - "outputs": [], - "source": [ - "Diversity = statistics.mean([result.metrics_data[0].score for result in eval_results.test_results])\n", - "print(Diversity)" - ] - }, - { - "cell_type": "markdown", - "id": "191cab63", - "metadata": {}, - "source": [ - "##### Calculating`\"Empowerment\"`" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "66bec0bf", - "metadata": {}, - "outputs": [], - "source": [ - "metric_name_list = [\"Empowerment\"]\n", - "eval_metrics = get_metrics(metric_name_list)\n", - "eval_results = await deepeval_answers(instances, answers, eval_metrics[\"deepeval_metrics\"])" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "1b043a8f", - "metadata": {}, - "outputs": [], - "source": [ - "Empowerment = statistics.mean(\n", - " [result.metrics_data[0].score for result in eval_results.test_results]\n", - ")\n", - "print(Empowerment)" - ] - }, - { - "cell_type": "markdown", - "id": "2cac3be9", - "metadata": {}, - "source": [ - "##### Calculating `\"Directness\"`" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "adaa17c0", - "metadata": {}, - "outputs": [], - "source": [ - "metric_name_list = [\"Directness\"]\n", - "eval_metrics = get_metrics(metric_name_list)\n", - "eval_results = await deepeval_answers(instances, answers, eval_metrics[\"deepeval_metrics\"])" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "3a8f97c9", - "metadata": {}, - "outputs": [], - "source": [ - "Directness = statistics.mean([result.metrics_data[0].score for result in eval_results.test_results])\n", - "print(Directness)" - ] - }, - { - "cell_type": "markdown", - "id": "1ad6feb8", - "metadata": {}, - "source": [ - "##### Calculating `\"F1\"`" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "bdc48259", - "metadata": {}, - "outputs": [], - "source": [ - "metric_name_list = [\"F1\"]\n", - "eval_metrics = get_metrics(metric_name_list)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "c43c17c8", - "metadata": {}, - "outputs": [], - "source": [ - "eval_results = await deepeval_answers(instances, answers, eval_metrics[\"deepeval_metrics\"])" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "8bfcc46d", - "metadata": {}, - "outputs": [], - "source": [ - "F1_score = statistics.mean([result.metrics_data[0].score for result in eval_results.test_results])\n", - "print(F1_score)" - ] - }, - { - "cell_type": "markdown", - "id": "2583f948", - "metadata": {}, - "source": [ - "##### Calculating `\"EM\"`" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "90a8f630", - "metadata": {}, - "outputs": [], - "source": [ - "metric_name_list = [\"EM\"]\n", - "eval_metrics = get_metrics(metric_name_list)\n", - "eval_results = await deepeval_answers(instances, answers, eval_metrics[\"deepeval_metrics\"])" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "8d1b1ea1", - "metadata": {}, - "outputs": [], - "source": [ - "EM = statistics.mean([result.metrics_data[0].score for result in eval_results.test_results])\n", - "print(EM)" - ] - }, - { - "cell_type": "markdown", - "id": "288ab570", - "metadata": {}, - "source": [ - "# Give us a star if you like it!\n", - "https://github.com/topoteretes/cognee" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "cognee-c83GrcRT-py3.11", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.10" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/llama_index_cognee_integration.ipynb b/notebooks/llama_index_cognee_integration.ipynb index 287c438e7..be6c4ea13 100644 --- a/notebooks/llama_index_cognee_integration.ipynb +++ b/notebooks/llama_index_cognee_integration.ipynb @@ -3,7 +3,9 @@ { "cell_type": "markdown", "metadata": {}, - "source": "[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1EpokQ8Y_5jIJ7HdixZms81Oqgh2sp7-E?usp=sharing)" + "source": [ + "[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1EpokQ8Y_5jIJ7HdixZms81Oqgh2sp7-E?usp=sharing)" + ] }, { "cell_type": "markdown", @@ -57,7 +59,9 @@ "execution_count": null, "metadata": {}, "outputs": [], - "source": "!pip install llama-index-graph-rag-cognee==0.1.3" + "source": [ + "!pip install llama-index-graph-rag-cognee==0.1.3" + ] }, { "cell_type": "code", @@ -192,7 +196,9 @@ { "cell_type": "markdown", "metadata": {}, - "source": "### Answer prompt based on RAG approach:" + "source": [ + "### Answer prompt based on RAG approach:" + ] }, { "cell_type": "code", @@ -210,7 +216,9 @@ { "cell_type": "markdown", "metadata": {}, - "source": "In conclusion, the results demonstrate a significant advantage of the knowledge graph-based approach (Graphrag) over the RAG approach. Graphrag successfully identified all the mentioned individuals across multiple documents, showcasing its ability to aggregate and infer information from a global context. In contrast, the RAG approach was limited to identifying individuals within a single document due to its chunking-based processing constraints. This highlights Graphrag's superior capability in comprehensively resolving queries that span across a broader corpus of interconnected data." + "source": [ + "In conclusion, the results demonstrate a significant advantage of the knowledge graph-based approach (Graphrag) over the RAG approach. Graphrag successfully identified all the mentioned individuals across multiple documents, showcasing its ability to aggregate and infer information from a global context. In contrast, the RAG approach was limited to identifying individuals within a single document due to its chunking-based processing constraints. This highlights Graphrag's superior capability in comprehensively resolving queries that span across a broader corpus of interconnected data." + ] }, { "cell_type": "markdown", @@ -271,7 +279,8 @@ ], "metadata": { "language_info": { - "name": "python" + "name": "python", + "version": "3.12.9" } }, "nbformat": 4, diff --git a/notebooks/ontology_demo.ipynb b/notebooks/ontology_demo.ipynb index 5ad71275f..c99238dcd 100644 --- a/notebooks/ontology_demo.ipynb +++ b/notebooks/ontology_demo.ipynb @@ -1,8 +1,9 @@ { "cells": [ { - "metadata": {}, "cell_type": "markdown", + "id": "25cf0a40e669a70", + "metadata": {}, "source": [ "# Understanding Ontologies with Cognee\n", "\n", @@ -21,43 +22,45 @@ "- **Instances**: Specific examples of classes (e.g., Type 2 Diabetes)\n", "- **Properties**: Relationships between classes/instances (e.g., hasSymptom)\n", "- **Axioms**: Logical statements defining relationships" - ], - "id": "25cf0a40e669a70" + ] }, { - "metadata": {}, "cell_type": "markdown", + "id": "441248da37f2b901", + "metadata": {}, "source": [ "## Setup\n", "\n", "First, let's install the required packages and set up our environment:" - ], - "id": "441248da37f2b901" + ] }, { + "cell_type": "code", + "execution_count": 17, + "id": "8cf7ba29f9a150af", "metadata": { "ExecuteTime": { "end_time": "2025-03-26T16:17:55.937140Z", "start_time": "2025-03-26T16:17:55.908542Z" } }, - "cell_type": "code", + "outputs": [], "source": [ "# Install required package\n", "# !pip install cognee" - ], - "id": "8cf7ba29f9a150af", - "outputs": [], - "execution_count": 17 + ] }, { + "cell_type": "code", + "execution_count": 18, + "id": "d825d126b3a0ec26", "metadata": { "ExecuteTime": { "end_time": "2025-03-26T16:18:09.382400Z", "start_time": "2025-03-26T16:18:09.342349Z" } }, - "cell_type": "code", + "outputs": [], "source": [ "# Import required libraries\n", "import cognee\n", @@ -72,14 +75,12 @@ "\n", "# Set up OpenAI API key (required for Cognee's LLM functionality)\n", "os.environ[\"LLM_API_KEY\"] = \"your-api-key-here\" # Replace with your API key" - ], - "id": "d825d126b3a0ec26", - "outputs": [], - "execution_count": 18 + ] }, { - "metadata": {}, "cell_type": "markdown", + "id": "6af350837e86b7a1", + "metadata": {}, "source": [ "## Creating the Pipeline\n", "\n", @@ -87,17 +88,19 @@ "1. Clean existing data\n", "2. Process scientific papers\n", "3. Apply ontological knowledge" - ], - "id": "6af350837e86b7a1" + ] }, { + "cell_type": "code", + "execution_count": 26, + "id": "4d0e4a58e4207a7d", "metadata": { "ExecuteTime": { "end_time": "2025-04-09T17:12:54.006718Z", "start_time": "2025-04-09T17:12:53.992906Z" } }, - "cell_type": "code", + "outputs": [], "source": [ "async def run_pipeline(ontology_path=None):\n", " # Clean existing data\n", @@ -128,29 +131,29 @@ " )\n", " answers.append(search_results)\n", " return answers" - ], - "id": "4d0e4a58e4207a7d", - "outputs": [], - "execution_count": 26 + ] }, { - "metadata": {}, "cell_type": "markdown", + "id": "c87c21a75d6f4d79", + "metadata": {}, "source": [ "## Running the Demo\n", "\n", "Let's test our system with some medical questions, comparing results with and without ontological knowledge:" - ], - "id": "c87c21a75d6f4d79" + ] }, { + "cell_type": "code", + "execution_count": 27, + "id": "1363772d2b48f5c0", "metadata": { "ExecuteTime": { "end_time": "2025-04-09T17:14:31.818452Z", "start_time": "2025-04-09T17:12:55.491598Z" } }, - "cell_type": "code", + "outputs": [], "source": [ "# Test questions\n", "questions = [\n", @@ -169,482 +172,27 @@ "answers_with = await query_pipeline(questions)\n", "for q, a in zip(questions, answers_with):\n", " print(f\"Q: {q}\\nA: {a}\\n\")" - ], - "id": "1363772d2b48f5c0", - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "--- Results WITH ontology ---\n", - "\n", - "\n", - "\u001B[2m2025-04-09T17:12:55.499538Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mGraph deleted successfully. \u001B[0m [\u001B[0m\u001B[1m\u001B[34mcognee.shared.logging_utils\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:12:55.588613Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mDatabase deleted successfully.\u001B[0m [\u001B[0m\u001B[1m\u001B[34mcognee.shared.logging_utils\u001B[0m]\u001B[0mUser 312efe9d-380c-4f8d-9848-f628fe3dc177 has registered.\n", - "\n", - "\n", - "\u001B[2m2025-04-09T17:12:55.747683Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mPipeline run started: `4b84e400-23fc-5976-bbb4-f8ee303eed81`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:12:55.749122Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `resolve_data_directories`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:12:55.750745Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `ingest_data`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:12:56.069185Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `ingest_data`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:12:56.069591Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `resolve_data_directories`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:12:56.070114Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mPipeline run completed: `4b84e400-23fc-5976-bbb4-f8ee303eed81`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\n", - "\u001B[2m2025-04-09T17:12:56.081871Z\u001B[0m [\u001B[33m\u001B[1mwarning \u001B[0m] \u001B[1mOntology file 'examples/python/ontology_input_example/enriched_medical_ontology_with_classes.owl' not found. Using fallback ontology at http://example.org/empty_ontology\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:12:56.083270Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mLookup built: 0 classes, 0 individuals\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:12:56.099230Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mPipeline run started: `af81ab41-8243-522f-a10a-b7b5febcc577`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:12:56.100778Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `classify_documents`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:12:56.102874Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `check_permissions_on_documents`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:12:56.105891Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mAsync generator task started: `extract_chunks_from_documents`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/Users/vasilije/cognee/.venv/lib/python3.11/site-packages/dlt/destinations/impl/sqlalchemy/merge_job.py:194: SAWarning: Table 'file_metadata' already exists within the given MetaData - not copying.\n", - " staging_table_obj = table_obj.to_metadata(\n", - "/Users/vasilije/cognee/.venv/lib/python3.11/site-packages/dlt/destinations/impl/sqlalchemy/merge_job.py:229: SAWarning: implicitly coercing SELECT object to scalar subquery; please use the .scalar_subquery() method to produce a scalar subquery.\n", - " order_by=order_dir_func(order_by_col),\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[2m2025-04-09T17:12:56.490952Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `extract_graph_from_data`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m19:12:56 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m19:12:56 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m19:12:56 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m19:12:56 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m19:12:56 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m19:12:56 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.028895Z\u001B[0m [\u001B[33m\u001B[1mwarning \u001B[0m] \u001B[1mFile /Users/vasilije/cognee/cognee/.cognee_system/databases/cognee_graph.pkl not found. Initializing an empty graph.\u001B[0m [\u001B[0m\u001B[1m\u001B[34mcognee.shared.logging_utils\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.031340Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'study' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.031582Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'coffee consumption study' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.031815Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'nutrient' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.032000Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'caffeinated coffee' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.032523Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'decaffeinated coffee' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.032768Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'health outcome' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.033005Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'mortality' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.033326Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'population' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.033618Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'participant population' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.033907Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'dietary pattern' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.034121Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'mediterranean diet' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.034391Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'eureye spain and valencia nutrition study' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.034592Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'statistical measurement' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.034943Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'p-value' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.035127Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'risk of death' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.035397Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'all-cause mortality' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.035564Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'cardiovascular disease mortality' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.035764Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'cancer mortality' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.035957Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'behavior' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.036177Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'coffee consumption' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.036551Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'beverage type' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.036791Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'demographic characteristic' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.036971Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'sex distribution' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.037179Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'age distribution' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.037412Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'education level' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.037593Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'health indicator' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.037748Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'body mass index' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.037952Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'waist circumference' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.038237Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'smoking status' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.038622Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'health condition' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.038857Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'diabetes status' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.039193Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'cholesterol status' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.039524Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'hypertension status' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.039801Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'physical activity' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.040067Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'tv watching' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.040355Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'sleeping time' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.040619Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'dietary index' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.040847Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'relative mediterranean diet index' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.041182Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'concept' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.041404Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'group' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.041719Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'mediterranean population' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.041914Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'metric' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.042158Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'research' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.042377Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'study 2021' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.042579Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'country' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.043107Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'spain' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.043321Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'person' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.043627Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'torres-collado, l.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.043899Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'garcia-de-la-hera, m.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.044128Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'navarrete-muΓ±oz, e.m.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.044345Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'notario-barandiaran, l.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.044588Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'gonzalez-palacios, s.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.044959Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'zurriaga, o.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.045232Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'melchor, i.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.045447Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'vioque, j.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.045630Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'navarro, a.m.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.045956Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'martinez-gonzalez, m. Γ‘.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.046206Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'gea, a.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.046422Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'grosso, g.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.046629Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'martin-moreno, j.m.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.046939Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'lopez-garcia, e.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.047166Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'martin-calvo, n.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.047426Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'toledo, e.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.047719Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'ruggiero, e.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.048060Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'di castelnuovo, a.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.048339Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'costanzo, s.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.048603Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'persichillo, m.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.048831Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'de curtis, a.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.049031Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'cerletti, c.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.049243Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'donati, m.b.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.049458Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'de gaetano, g.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.049693Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'iacoviello, l.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.049907Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'bonaccio, m.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.050227Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'moli-sani study' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.050482Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'quiles, j.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.050703Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'organization' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.050875Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'u.s. department of agriculture' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.051151Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'database' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.051437Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'usda national nutrient database' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.051639Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'palma, i.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.051816Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'cantΓ³s, d.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.052024Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'lean, m.e.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.052242Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'harlow, s.d.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.052466Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'malerba, s.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.052723Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'crippa, a.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.052949Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'je, y.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.053201Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'park, s.-y.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.053447Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'gunter, m.j.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.053667Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'sado, j.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.053863Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'dinu, m.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.054068Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'gΓΆkcen, b.b.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.054375Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'yu, x.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.054586Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'gonzalez de mejia, e.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.054764Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'yamagata, k.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.054991Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'machado-fragua, m.d.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.055251Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'date' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.055480Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for '2018' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.056014Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'michael f. mendoza' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.056232Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'ralf martz sulague' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.056451Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'therese posas-mendoza' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.056709Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'carl j. lavie' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.057211Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'publication' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.057503Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'ochsner journal' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.057723Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'cardiovascular health' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.057989Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'impact of coffee consumption on cardiovascular health' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.058182Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'condition' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.058357Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'hypertension' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.058542Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'coronary heart disease' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.058710Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'heart failure' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.058870Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'atrial fibrillation' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.059039Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for '2000-2021' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.059210Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'compound' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.059397Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'caffeine' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.059735Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'mendoza, mf' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.060066Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'coronary artery risk development in young adults study' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:45.060328Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'bodar et al. (2019)' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:52.506030Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `summarize_text`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m19:13:52 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m19:13:52 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m19:13:52 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m19:13:52 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m19:13:52 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m19:13:52 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0m\n", - "\u001B[2m2025-04-09T17:13:58.267490Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `add_data_points`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:14:07.439855Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `add_data_points`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:14:07.440337Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `summarize_text`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:14:07.440524Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `extract_graph_from_data`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:14:07.440690Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mAsync generator task completed: `extract_chunks_from_documents`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:14:07.440886Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `check_permissions_on_documents`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:14:07.441125Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `classify_documents`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T17:14:07.441383Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mPipeline run completed: `af81ab41-8243-522f-a10a-b7b5febcc577`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m19:14:09 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m19:14:23 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m19:14:27 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m19:14:30 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0mQ: What are common risk factors for Type 2 Diabetes?\n", - "A: ['Common risk factors for Type 2 Diabetes include:\\n1. **Obesity** - particularly a high body mass index (BMI) (β‰₯30 kg/m2).\\n2. **Waist circumference** - increased risk is associated with larger waist sizes.\\n3. **Sedentary lifestyle** - low levels of physical activity are linked to higher risk.\\n4. **Age** - the risk increases with age, especially for those over 45 years.\\n5. **Diet** - poor dietary choices, including low adherence to a Mediterranean diet, may contribute.\\n6. **Smoking** - current smoking status is a risk factor.\\n7. **Hypertension** - having high blood pressure increases risk.\\n8. **Cholesterol levels** - high cholesterol levels may also be a factor.']\n", - "\n", - "Q: What preventive measures reduce the risk of Hypertension?\n", - "A: ['Preventive measures to reduce the risk of hypertension include moderate coffee consumption, which has been associated with a decreased risk of developing hypertension, particularly in non-smokers. Other potential mechanisms of benefit from coffee include inhibition of sodium and water reabsorption, as well as anti-inflammatory effects.']\n", - "\n", - "Q: What symptoms indicate possible Cardiovascular Disease?\n", - "A: ['Possible symptoms indicating cardiovascular disease include: hypertension, heart failure, atrial fibrillation, elevated cholesterol levels, and increased risk of myocardial infarction. Regular coffee consumption is associated with decreased risks of some of these conditions, whereas heavy coffee consumption may have inconsistent effects.']\n", - "\n", - "Q: What diseases are associated with Obesity?\n", - "A: ['Obesity is associated with the following health conditions:\\n1. Cardiovascular disease mortality (as a health outcome).\\n2. Diabetes status (as a health condition).\\n3. Cholesterol status (as a health condition).']\n", - "\n" - ] - } - ], - "execution_count": 27 + ] }, { - "metadata": {}, "cell_type": "code", - "outputs": [], "execution_count": null, - "source": "", - "id": "89e2e53dcecb78eb" + "id": "89e2e53dcecb78eb", + "metadata": {}, + "outputs": [], + "source": [] }, { + "cell_type": "code", + "execution_count": 23, + "id": "3aa18f4cdd5ceff6", "metadata": { "ExecuteTime": { "end_time": "2025-04-09T14:32:24.891560Z", "start_time": "2025-04-09T14:30:47.863808Z" } }, - "cell_type": "code", + "outputs": [], "source": [ "# Run without ontology\n", "print(\"\\n--- Results WITHOUT ontology ---\\n\")\n", @@ -652,536 +200,51 @@ "answers_without = await query_pipeline(questions)\n", "for q, a in zip(questions, answers_without):\n", " print(f\"Q: {q}\\nA: {a}\\n\")" - ], - "id": "3aa18f4cdd5ceff6", - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "--- Results WITHOUT ontology ---\n", - "\n", - "\n", - "\u001B[2m2025-04-09T14:30:47.865578Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mGraph deleted successfully. \u001B[0m [\u001B[0m\u001B[1m\u001B[34mcognee.shared.logging_utils\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:30:47.879242Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mDatabase deleted successfully.\u001B[0m [\u001B[0m\u001B[1m\u001B[34mcognee.shared.logging_utils\u001B[0m]\u001B[0mUser 5fcea8fd-95ce-4a3b-861e-d8f8a5d01fe5 has registered.\n", - "\n", - "\n", - "\u001B[2m2025-04-09T14:30:47.952091Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mPipeline run started: `4b84e400-23fc-5976-bbb4-f8ee303eed81`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:30:47.952386Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `resolve_data_directories`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:30:47.952810Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `ingest_data`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:30:48.127543Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `ingest_data`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:30:48.127926Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `resolve_data_directories`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:30:48.128135Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mPipeline run completed: `4b84e400-23fc-5976-bbb4-f8ee303eed81`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\n", - "\u001B[2m2025-04-09T14:30:48.135862Z\u001B[0m [\u001B[33m\u001B[1mwarning \u001B[0m] \u001B[1mOntology file 'None' not found. Using fallback ontology at http://example.org/empty_ontology\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:30:48.136338Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mLookup built: 0 classes, 0 individuals\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:30:48.145025Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mPipeline run started: `af81ab41-8243-522f-a10a-b7b5febcc577`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:30:48.145316Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `classify_documents`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:30:48.145568Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `check_permissions_on_documents`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:30:48.148188Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mAsync generator task started: `extract_chunks_from_documents`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/Users/vasilije/cognee/.venv/lib/python3.11/site-packages/dlt/destinations/impl/sqlalchemy/merge_job.py:194: SAWarning: Table 'file_metadata' already exists within the given MetaData - not copying.\n", - " staging_table_obj = table_obj.to_metadata(\n", - "/Users/vasilije/cognee/.venv/lib/python3.11/site-packages/dlt/destinations/impl/sqlalchemy/merge_job.py:229: SAWarning: implicitly coercing SELECT object to scalar subquery; please use the .scalar_subquery() method to produce a scalar subquery.\n", - " order_by=order_dir_func(order_by_col),\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[2m2025-04-09T14:30:48.491623Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `extract_graph_from_data`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m16:30:48 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m16:30:48 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m16:30:48 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m16:30:48 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m16:30:48 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m16:30:48 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.725114Z\u001B[0m [\u001B[33m\u001B[1mwarning \u001B[0m] \u001B[1mFile /Users/vasilije/cognee/cognee/.cognee_system/databases/cognee_graph.pkl not found. Initializing an empty graph.\u001B[0m [\u001B[0m\u001B[1m\u001B[34mcognee.shared.logging_utils\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.728424Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'person' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.728765Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'michael f. mendoza' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.729061Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'ralf martz sulague' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.729298Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'therese posas-mendoza' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.729489Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'carl j. lavie' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.729721Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'organization' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.729906Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'ochsner clinic foundation' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.730134Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'georgetown university' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.730308Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'publication' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.730488Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'ochsner journal' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.730684Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'concept' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.730862Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'coffee consumption' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.731104Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'cardiovascular health' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.731289Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'cardiovascular disease' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.731461Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'hypertension' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.731690Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'cholesterol' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.731955Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'heart failure' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.732126Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'atrial fibrillation' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.732315Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'coronary heart disease' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.732488Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'phenolic acid' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.732691Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'diterpenes' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.732873Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'gene' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.733046Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'cyp1a2' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.733274Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'coffee preparation methods' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.733593Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'mendoza, mf' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.733935Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'diabetes mellitus' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.734489Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'infarction' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.734817Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'left ventricular function' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.735100Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'mortality' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.735288Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'oxidative stress' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.735482Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'research methodology' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.735649Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'meta-analysis' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.735816Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'antioxidants' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.736048Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'laura torres-collado' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.736250Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'laura marΓ­a compaΓ±-gabucio' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.736442Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'sandra gonzΓ‘lez-palacios' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.736626Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'leyre notario-barandiaran' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.736796Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'alejandro oncina-cΓ‘novas' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.736959Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'jesΓΊs vioque' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.737123Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'manuela garcΓ­a-de la hera' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.737288Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'journal' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.737436Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'nutrients 2021' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.737591Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'study' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.737782Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'valencia nutrition study' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.738030Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'eureye-spain' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.738267Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'valencia nutrition survey' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.738422Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'demographic' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.738578Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'participants aged 20 years and above' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.738743Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'health metric' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.739188Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'age' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.739521Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'education level' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.739834Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'body mass index (bmi)' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.740034Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'waist circumference' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.740213Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'smoking status' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.740388Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'diabetes' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.740719Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'physical activity' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.740905Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'tv watching' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.741075Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'sleeping time' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.741375Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'rmed index' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.741550Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for '6 years follow-up mortality' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.741725Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for '12 years follow-up mortality' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.741889Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for '18 years follow-up mortality' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.742134Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'population' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.742306Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'mediterranean population' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.742479Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'health behavior' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.742802Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'beverage' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.743001Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'caffeinated coffee' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.743187Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'health outcome' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.743374Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'cancer mortality' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.743543Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'all-cause mortality' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.743722Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'cvd mortality' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.743892Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'country' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.744058Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'spain' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.744231Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'decaffeinated coffee' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.744483Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'scientific concept' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.744647Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'biological mechanisms' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.744831Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'research participants' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.745001Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'chemical' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.745162Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'caffeine' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.745435Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'torres-collado, l.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.745639Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'garcia-de-la-hera, m.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.745808Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'navarrete-muΓ±oz, e.m.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.746008Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'notario-barandiaran, l.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.746185Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'gonzalez-palacios, s.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.746657Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'zurriaga, o.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.746868Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'melchor, i.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.747422Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'vioque, j.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.747692Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'navarro, a.m.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.747904Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'martinez-gonzalez, m.Γ‘.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.748081Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'gea, a.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.748254Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'grosso, g.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.748421Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'ruggiero, e.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.748580Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'di castelnuovo, a.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.748758Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'costanzo, s.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.748926Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'persichillo, m.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.749109Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'de curtis, a.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.749301Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'cerletti, c.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.749494Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'donati, m.b.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.749667Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'de gaetano, g.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.749845Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'iacoviello, l.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.750035Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'bonaccio, m.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.750210Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'harlow, s.d.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.750388Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'linet, m.s.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.750567Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'malerba, s.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.750830Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'dinu, m.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.751026Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'yu, x.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.751207Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'gonzalez de mejia, e.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.751368Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'yamagata, k.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.751619Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'gΓΆkcen, b.b.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.751870Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'machado-fragua, m.d.' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.752101Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'date' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.752294Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for '2018-01-01' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.752469Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for '2021-01-01' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.752651Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'coffee consumption and mortality from all causes' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.752821Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'coffee consumption and total mortality in mediterranean cohort' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.753004Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'coffee drinking and lower risks of mortality' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.753181Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'validity of food frequency questionnaire' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.753343Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'adherence to mediterranean diet and coronary heart disease risk' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.753526Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'diet and overall survival in elderly people' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.753701Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'adherence to mediterranean diet and survival' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.753964Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'database' in category 'classes'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.754204Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'usda national nutrient database' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.754391Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'coffee consumption and mortality meta-analysis' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:31:53.754580Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo close match found for 'mediterranean diet and multiple health outcomes' in category 'individuals'\u001B[0m [\u001B[0m\u001B[1m\u001B[34mOntologyAdapter\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:32:00.293116Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `summarize_text`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m16:32:00 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m16:32:00 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m16:32:00 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m16:32:00 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m16:32:00 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m16:32:00 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0m\n", - "\u001B[2m2025-04-09T14:32:05.162204Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `add_data_points`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:32:10.432940Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `add_data_points`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:32:10.433399Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `summarize_text`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:32:10.433585Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `extract_graph_from_data`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:32:10.433749Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mAsync generator task completed: `extract_chunks_from_documents`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:32:10.433973Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `check_permissions_on_documents`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:32:10.434164Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `classify_documents`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T14:32:10.434368Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mPipeline run completed: `af81ab41-8243-522f-a10a-b7b5febcc577`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks(tasks: [Task], data)\u001B[0m]\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m16:32:12 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m16:32:16 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m16:32:20 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0m" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001B[92m16:32:23 - LiteLLM:INFO\u001B[0m: utils.py:2784 - \n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[1m\n", - "LiteLLM completion() model= gpt-4o-mini; provider = openai\u001B[0mQ: What are common risk factors for Type 2 Diabetes?\n", - "A: ['Common risk factors for Type 2 Diabetes include obesity, physical inactivity, and poor diet. Additionally, coffee consumption may be related to lower mortality rates, which could indirectly influence diabetes risk. Participants aged 20 years and above are also considered in health metrics related to diabetes.']\n", - "\n", - "Q: What preventive measures reduce the risk of Hypertension?\n", - "A: ['Preventive measures that reduce the risk of hypertension include moderate coffee consumption, which is linked to reduced cardiovascular disease mortality and potentially lower risks for hypertension, cholesterol issues, heart failure, and atrial fibrillation. Additionally, antioxidants may also provide a preventative effect on cardiovascular health.']\n", - "\n", - "Q: What symptoms indicate possible Cardiovascular Disease?\n", - "A: ['Symptoms that may indicate possible Cardiovascular Disease include hypertension, heart failure, and atrial fibrillation. Additionally, high cholesterol levels can also be a sign of cardiovascular issues.']\n", - "\n", - "Q: What diseases are associated with Obesity?\n", - "A: ['Diseases associated with obesity include cardiovascular disease (CVD) and diabetes mellitus.']\n", - "\n" - ] - } - ], - "execution_count": 23 + ] }, { - "metadata": {}, "cell_type": "markdown", + "id": "c60533d2423acdb0", + "metadata": {}, "source": [ "## Visualizing the Knowledge Graph\n", "\n", "Let's visualize how our ontology connects different medical concepts:" - ], - "id": "c60533d2423acdb0" + ] }, { + "cell_type": "code", + "execution_count": 25, + "id": "36ee2a360f47a054", "metadata": { "ExecuteTime": { "end_time": "2025-04-09T15:25:33.512697Z", "start_time": "2025-04-09T15:25:33.471854Z" } }, - "cell_type": "code", + "outputs": [], "source": [ "from cognee.api.v1.visualize import visualize_graph\n", "await visualize_graph()" - ], - "id": "36ee2a360f47a054", - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\u001B[2m2025-04-09T15:25:33.504468Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mGraph visualization saved as /Users/vasilije/graph_visualization.html\u001B[0m [\u001B[0m\u001B[1m\u001B[34mcognee.shared.logging_utils\u001B[0m]\u001B[0m\n", - "\u001B[2m2025-04-09T15:25:33.505762Z\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mThe HTML file has been stored on your home directory! Navigate there with cd ~\u001B[0m [\u001B[0m\u001B[1m\u001B[34mcognee.shared.logging_utils\u001B[0m]\u001B[0m" - ] - }, - { - "data": { - "text/plain": [ - "'\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\n \\n \\n \\n \\n \\n '" - ] - }, - "execution_count": 25, - "metadata": {}, - "output_type": "execute_result" - } - ], - "execution_count": 25 + ] }, { + "cell_type": "code", + "execution_count": null, + "id": "9268fa61dbc81664", "metadata": { "ExecuteTime": { "end_time": "2025-04-10T16:34:04.760472Z", "start_time": "2025-04-10T16:34:04.736095Z" } }, - "cell_type": "code", - "source": "", - "id": "9268fa61dbc81664", "outputs": [], - "execution_count": null + "source": [] }, { - "metadata": {}, "cell_type": "markdown", + "id": "ff39326921b75273", + "metadata": {}, "source": [ "## Understanding the Results\n", "\n", @@ -1210,16 +273,15 @@ "- Place your scientific papers in the appropriate directory\n", "- Update the ontology path to point to your .owl file\n", "- Replace the API key with your own OpenAI key" - ], - "id": "ff39326921b75273" + ] }, { - "metadata": {}, "cell_type": "code", - "outputs": [], "execution_count": null, - "source": "", - "id": "8d2a0fe555a7bc0f" + "id": "8d2a0fe555a7bc0f", + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": {