cognee/notebooks/ontology_demo.ipynb

1185 lines
96 KiB
Text
Vendored

{
"cells": [
{
"cell_type": "markdown",
"id": "25cf0a40e669a70",
"metadata": {},
"source": [
"# Understanding Ontologies with Cognee\n",
"\n",
"This notebook demonstrates how to work with ontologies in scientific research using the Cognee framework. We'll explore how ontologies can enhance our understanding and querying of scientific papers.\n",
"\n",
"## What is an Ontology?\n",
"\n",
"An ontology is a formal representation of knowledge that defines:\n",
"- Concepts within a domain\n",
"- Relationships between concepts\n",
"- Properties and attributes\n",
"- Rules and constraints\n",
"\n",
"Key terms:\n",
"- **Classes**: Categories or types (e.g., Disease, Symptom)\n",
"- **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"
]
},
{
"cell_type": "markdown",
"id": "441248da37f2b901",
"metadata": {},
"source": [
"## Setup\n",
"\n",
"First, let's install the required packages and set up our environment:"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "8cf7ba29f9a150af",
"metadata": {
"ExecuteTime": {
"end_time": "2025-03-26T16:17:55.937140Z",
"start_time": "2025-03-26T16:17:55.908542Z"
}
},
"outputs": [],
"source": [
"# Install required package\n",
"# !pip install cognee"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "abb86851",
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"\n",
"# Set up OpenAI API key (required for Cognee's LLM functionality)\n",
"if \"LLM_API_KEY\" not in os.environ:\n",
" os.environ[\"LLM_API_KEY\"] = \"your-api-key-here\" # Replace with your API key"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d825d126b3a0ec26",
"metadata": {
"ExecuteTime": {
"end_time": "2025-03-26T16:18:09.382400Z",
"start_time": "2025-03-26T16:18:09.342349Z"
}
},
"outputs": [],
"source": [
"# Import required libraries\n",
"import cognee\n",
"from cognee.shared.logging_utils import get_logger\n",
"\n",
"cognee.config.set_llm_model(\"gpt-4o-mini\")\n",
"cognee.config.set_llm_provider(\"openai\")\n",
"from cognee.api.v1.search import SearchType\n",
"\n",
"logger = get_logger()"
]
},
{
"cell_type": "markdown",
"id": "6af350837e86b7a1",
"metadata": {},
"source": [
"## Creating the Pipeline\n",
"\n",
"Let's create a pipeline that will:\n",
"1. Clean existing data\n",
"2. Process scientific papers\n",
"3. Apply ontological knowledge"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "4d0e4a58e4207a7d",
"metadata": {
"ExecuteTime": {
"end_time": "2025-04-09T17:12:54.006718Z",
"start_time": "2025-04-09T17:12:53.992906Z"
}
},
"outputs": [],
"source": [
"async def run_pipeline(ontology_path=None):\n",
" # Clean existing data\n",
" await cognee.prune.prune_data()\n",
" await cognee.prune.prune_system(metadata=True)\n",
" \n",
" # Set up path to scientific papers\n",
" scientific_papers_dir = os.path.join(\n",
" os.path.dirname(os.path.dirname(os.path.abspath(\".\"))), \n",
" \"cognee\",\n",
" \"examples\",\n",
" \"data\", \n",
" \"scientific_papers/\"\n",
" )\n",
" \n",
" # Add papers to the system\n",
" await cognee.add(scientific_papers_dir)\n",
" \n",
" # Cognify with optional ontology\n",
" return await cognee.cognify(ontology_file_path=ontology_path)\n",
"\n",
"async def query_pipeline(questions):\n",
" answers = []\n",
" for question in questions:\n",
" search_results = await cognee.search(\n",
" query_type=SearchType.GRAPH_COMPLETION,\n",
" query_text=question,\n",
" )\n",
" answers.append(search_results)\n",
" return answers"
]
},
{
"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:"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "1363772d2b48f5c0",
"metadata": {
"ExecuteTime": {
"end_time": "2025-04-09T17:14:31.818452Z",
"start_time": "2025-04-09T17:12:55.491598Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"\n",
"\u001b[2m2025-08-27T13:55:36.031761\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mDeleted Kuzu database files at /Users/daulet/Desktop/dev/cognee-claude/cognee/.cognee_system/databases/cognee_graph_kuzu\u001b[0m [\u001b[0m\u001b[1m\u001b[34mcognee.shared.logging_utils\u001b[0m]\u001b[0m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"--- Results WITH ontology ---\n",
"\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"\n",
"\u001b[2m2025-08-27T13:55:36.330304\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[0m\n",
"\n",
"\u001b[2m2025-08-27T13:55:36.521821\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mPipeline run started: `88a655ee-2a8f-5e47-90b4-ccc5aee28ee5`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_with_telemetry()\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:55:36.683661\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task started: `resolve_data_directories`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"User a6d0292a-e5d5-4087-a06d-e6e40c92ddbd has registered.\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"\n",
"\u001b[2m2025-08-27T13:55:36.852839\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task started: `ingest_data`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:55:37.022061\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mReading PDF: /Users/daulet/Desktop/dev/cognee/examples/data/scientific_papers/nutrients-13-01241.pdf\u001b[0m [\u001b[0m\u001b[1m\u001b[34mcognee.infrastructure.loaders.external.pypdf_loader\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:55:37.159853\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task completed: `ingest_data`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:55:37.317975\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task completed: `resolve_data_directories`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:55:37.464301\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mPipeline run completed: `88a655ee-2a8f-5e47-90b4-ccc5aee28ee5`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_with_telemetry()\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:55:37.631226\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mPipeline run started: `88a655ee-2a8f-5e47-90b4-ccc5aee28ee5`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_with_telemetry()\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:55:37.806056\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task started: `resolve_data_directories`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:55:37.952328\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task started: `ingest_data`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:55:38.123930\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mReading PDF: /Users/daulet/Desktop/dev/cognee/examples/data/scientific_papers/TOJ-22-0073_152Mendoza.pdf\u001b[0m [\u001b[0m\u001b[1m\u001b[34mcognee.infrastructure.loaders.external.pypdf_loader\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:55:38.230010\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task completed: `ingest_data`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:55:38.400266\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task completed: `resolve_data_directories`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:55:38.544525\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mPipeline run completed: `88a655ee-2a8f-5e47-90b4-ccc5aee28ee5`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_with_telemetry()\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:55:38.712540\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mOntology file 'examples/python/ontology_input_example/enriched_medical_ontology_with_classes.owl' not found. No owl ontology will be attached to the graph.\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:55:38.726158\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mPipeline run started: `3a6c74ba-93cd-56db-a1c5-9c48aa366dc5`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_with_telemetry()\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:55:38.871531\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task started: `classify_documents`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:55:39.018586\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task started: `check_permissions_on_dataset`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:55:39.179788\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_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:55:39.369582\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_base\u001b[0m]\u001b[0m\n",
"\u001b[92m14:55:39 - LiteLLM:INFO\u001b[0m: utils.py:3341 - \n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\n",
"\n",
"\u001b[1m\n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\u001b[0m\n",
"\u001b[92m14:55:39 - LiteLLM:INFO\u001b[0m: utils.py:3341 - \n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\n",
"\n",
"\u001b[1m\n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\u001b[0m\n",
"\u001b[92m14:55:39 - LiteLLM:INFO\u001b[0m: utils.py:3341 - \n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\n",
"\n",
"\u001b[1m\n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:11.658679\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",
"\n",
"\u001b[2m2025-08-27T13:56:11.660483\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",
"\n",
"\u001b[2m2025-08-27T13:56:11.660854\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",
"\n",
"\u001b[2m2025-08-27T13:56:11.661218\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",
"\n",
"\u001b[2m2025-08-27T13:56:11.661612\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",
"\n",
"\u001b[2m2025-08-27T13:56:11.661903\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",
"\n",
"\u001b[2m2025-08-27T13:56:11.662160\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",
"\n",
"\u001b[2m2025-08-27T13:56:11.662469\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",
"\n",
"\u001b[2m2025-08-27T13:56:11.662774\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",
"\n",
"\u001b[2m2025-08-27T13:56:11.663026\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",
"\n",
"\u001b[2m2025-08-27T13:56:11.663391\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",
"\n",
"\u001b[2m2025-08-27T13:56:11.663658\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",
"\n",
"\u001b[2m2025-08-27T13:56:11.663932\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",
"\n",
"\u001b[2m2025-08-27T13:56:11.664183\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",
"\n",
"\u001b[2m2025-08-27T13:56:11.664460\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'disease' in category 'classes'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:11.664706\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",
"\n",
"\u001b[2m2025-08-27T13:56:11.665024\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'cancer' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:11.665327\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'outcome' in category 'classes'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:11.665566\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",
"\n",
"\u001b[2m2025-08-27T13:56:11.665804\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",
"\n",
"\u001b[2m2025-08-27T13:56:11.666041\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'national death index' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:11.666342\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",
"\n",
"\u001b[2m2025-08-27T13:56:11.666631\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'diet' in category 'classes'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:11.666882\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",
"\n",
"\u001b[2m2025-08-27T13:56:11.667152\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'duration' in category 'classes'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:11.667354\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'follow-up period' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:11.667602\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'fda 2021 study' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:11.667963\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",
"\n",
"\u001b[2m2025-08-27T13:56:11.668205\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",
"\n",
"\u001b[2m2025-08-27T13:56:11.668473\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",
"\n",
"\u001b[2m2025-08-27T13:56:11.668722\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",
"\n",
"\u001b[2m2025-08-27T13:56:11.668963\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",
"\n",
"\u001b[2m2025-08-27T13:56:11.669206\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",
"\n",
"\u001b[2m2025-08-27T13:56:11.669438\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",
"\n",
"\u001b[2m2025-08-27T13:56:11.669706\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",
"\n",
"\u001b[2m2025-08-27T13:56:11.669937\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'period' in category 'classes'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:11.670145\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for '18 years follow up' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:11.670439\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",
"\n",
"\u001b[2m2025-08-27T13:56:11.670862\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'moderate consumption' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:11.671122\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",
"\n",
"\u001b[2m2025-08-27T13:56:11.671349\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",
"\n",
"\u001b[2m2025-08-27T13:56:11.671712\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'chronic illness' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:11.671900\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",
"\n",
"\u001b[2m2025-08-27T13:56:11.672117\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'elderly population' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:11.672357\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'spanish population' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:11.672771\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'nutritional survey' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:11.672995\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'study authors' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:14.617820\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task started: `summarize_text`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\u001b[92m14:56:14 - LiteLLM:INFO\u001b[0m: utils.py:3341 - \n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\n",
"\n",
"\u001b[1m\n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\u001b[0m\n",
"\u001b[92m14:56:14 - LiteLLM:INFO\u001b[0m: utils.py:3341 - \n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\n",
"\n",
"\u001b[1m\n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\u001b[0m\n",
"\u001b[92m14:56:14 - LiteLLM:INFO\u001b[0m: utils.py:3341 - \n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\n",
"\n",
"\u001b[1m\n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:20.416149\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task started: `add_data_points`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:24.327046\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task completed: `add_data_points`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:24.483512\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task completed: `summarize_text`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:24.634531\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_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:24.800450\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_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:24.959932\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task completed: `check_permissions_on_dataset`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:25.116106\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task completed: `classify_documents`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:25.281875\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mPipeline run completed: `3a6c74ba-93cd-56db-a1c5-9c48aa366dc5`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_with_telemetry()\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:25.429555\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mPipeline run started: `3a6c74ba-93cd-56db-a1c5-9c48aa366dc5`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_with_telemetry()\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:25.588955\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task started: `classify_documents`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:25.744193\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task started: `check_permissions_on_dataset`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:25.909248\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_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:26.099711\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_base\u001b[0m]\u001b[0m\n",
"\u001b[92m14:56:26 - LiteLLM:INFO\u001b[0m: utils.py:3341 - \n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\n",
"\n",
"\u001b[1m\n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\u001b[0m\n",
"\u001b[92m14:56:26 - LiteLLM:INFO\u001b[0m: utils.py:3341 - \n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\n",
"\n",
"\u001b[1m\n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:48.017564\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",
"\n",
"\u001b[2m2025-08-27T13:56:48.020412\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",
"\n",
"\u001b[2m2025-08-27T13:56:48.021095\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",
"\n",
"\u001b[2m2025-08-27T13:56:48.021558\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",
"\n",
"\u001b[2m2025-08-27T13:56:48.022129\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",
"\n",
"\u001b[2m2025-08-27T13:56:48.022674\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",
"\n",
"\u001b[2m2025-08-27T13:56:48.023245\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'coffee' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:48.023721\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",
"\n",
"\u001b[2m2025-08-27T13:56:48.024235\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",
"\n",
"\u001b[2m2025-08-27T13:56:48.024721\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",
"\n",
"\u001b[2m2025-08-27T13:56:48.025227\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",
"\n",
"\u001b[2m2025-08-27T13:56:48.025607\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",
"\n",
"\u001b[2m2025-08-27T13:56:48.026034\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",
"\n",
"\u001b[2m2025-08-27T13:56:48.026407\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",
"\n",
"\u001b[2m2025-08-27T13:56:48.026835\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'dietary nutrient' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:48.027189\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'action' in category 'classes'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:48.027578\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",
"\n",
"\u001b[2m2025-08-27T13:56:48.027937\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",
"\n",
"\u001b[2m2025-08-27T13:56:48.028310\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",
"\n",
"\u001b[2m2025-08-27T13:56:48.029010\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",
"\n",
"\u001b[2m2025-08-27T13:56:48.029272\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",
"\n",
"\u001b[2m2025-08-27T13:56:48.029707\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",
"\n",
"\u001b[2m2025-08-27T13:56:48.030169\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for '2023-01-01' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:48.030506\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",
"\n",
"\u001b[2m2025-08-27T13:56:48.031084\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'medical condition' in category 'classes'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:48.031452\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",
"\n",
"\u001b[2m2025-08-27T13:56:48.031900\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",
"\n",
"\u001b[2m2025-08-27T13:56:48.032243\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",
"\n",
"\u001b[2m2025-08-27T13:56:48.032714\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",
"\n",
"\u001b[2m2025-08-27T13:56:48.033041\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'chemical compounds' in category 'classes'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:48.033366\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",
"\n",
"\u001b[2m2025-08-27T13:56:48.033701\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'medical topic' in category 'classes'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:48.034065\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",
"\n",
"\u001b[2m2025-08-27T13:56:48.034340\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'health concept' in category 'classes'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:48.034758\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'health benefits' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:48.035022\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'chemical compound' in category 'classes'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:48.035511\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'chlorogenic acid' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:48.035929\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'ferulic acid' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:48.036169\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'chemical element' in category 'classes'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:48.036785\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'magnesium' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:48.037181\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'trigonelline' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:48.038230\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'p-coumaric acid' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:51.414844\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task started: `summarize_text`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\u001b[92m14:56:51 - LiteLLM:INFO\u001b[0m: utils.py:3341 - \n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\n",
"\n",
"\u001b[1m\n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\u001b[0m\n",
"\u001b[92m14:56:51 - LiteLLM:INFO\u001b[0m: utils.py:3341 - \n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\n",
"\n",
"\u001b[1m\n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:56:56.891985\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task started: `add_data_points`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:01.419876\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task completed: `add_data_points`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:01.558475\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task completed: `summarize_text`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:01.702641\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_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:01.871728\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_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:02.026804\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task completed: `check_permissions_on_dataset`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:02.183571\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task completed: `classify_documents`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:02.344790\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mPipeline run completed: `3a6c74ba-93cd-56db-a1c5-9c48aa366dc5`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_with_telemetry()\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:02.688185\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mGraph projection completed: 93 nodes, 194 edges in 0.01s\u001b[0m [\u001b[0m\u001b[1m\u001b[34mCogneeGraph\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:03.214983\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mVector collection retrieval completed: Retrieved distances from 6 collections in 0.04s\u001b[0m [\u001b[0m\u001b[1m\u001b[34mcognee.shared.logging_utils\u001b[0m]\u001b[0m\n",
"\u001b[92m14:57:03 - LiteLLM:INFO\u001b[0m: utils.py:3341 - \n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\n",
"\n",
"\u001b[1m\n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:06.496514\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mGraph projection completed: 93 nodes, 194 edges in 0.01s\u001b[0m [\u001b[0m\u001b[1m\u001b[34mCogneeGraph\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:06.962219\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mVector collection retrieval completed: Retrieved distances from 6 collections in 0.02s\u001b[0m [\u001b[0m\u001b[1m\u001b[34mcognee.shared.logging_utils\u001b[0m]\u001b[0m\n",
"\u001b[92m14:57:07 - LiteLLM:INFO\u001b[0m: utils.py:3341 - \n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\n",
"\n",
"\u001b[1m\n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:12.400015\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mGraph projection completed: 93 nodes, 194 edges in 0.01s\u001b[0m [\u001b[0m\u001b[1m\u001b[34mCogneeGraph\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:12.800274\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mVector collection retrieval completed: Retrieved distances from 6 collections in 0.01s\u001b[0m [\u001b[0m\u001b[1m\u001b[34mcognee.shared.logging_utils\u001b[0m]\u001b[0m\n",
"\u001b[92m14:57:12 - LiteLLM:INFO\u001b[0m: utils.py:3341 - \n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\n",
"\n",
"\u001b[1m\n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:15.801364\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mGraph projection completed: 93 nodes, 194 edges in 0.01s\u001b[0m [\u001b[0m\u001b[1m\u001b[34mCogneeGraph\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:16.301946\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mVector collection retrieval completed: Retrieved distances from 6 collections in 0.02s\u001b[0m [\u001b[0m\u001b[1m\u001b[34mcognee.shared.logging_utils\u001b[0m]\u001b[0m\n",
"\u001b[92m14:57:16 - LiteLLM:INFO\u001b[0m: utils.py:3341 - \n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\n",
"\n",
"\u001b[1m\n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\u001b[0m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Q: What are common risk factors for Type 2 Diabetes?\n",
"A: ['Common risk factors for Type 2 Diabetes include:\\n1. Obesity, particularly with a high body mass index (BMI).\\n2. Physical inactivity or low levels of exercise.\\n3. Unhealthy diet, particularly high in sugar and fats.\\n4. Family history of diabetes.\\n5. Age, especially being over 45 years old.\\n6. High blood pressure or hypertension.\\n7. High cholesterol levels.\\n8. History of gestational diabetes or giving birth to a baby over 9 lbs.\\n9. Ethnicity, with higher risk in certain populations (e.g., African American, Hispanic).\\n10. Insulin resistance or metabolic syndrome.']\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 has been associated with a decreased risk of developing hypertension, heart failure, and atrial fibrillation. Additionally, adjustments in lifestyle factors, such as avoiding excessive coffee consumption, especially boiled or unfiltered varieties, which can raise cholesterol levels, can further help lower hypertension risk.']\n",
"\n",
"Q: What symptoms indicate possible Cardiovascular Disease?\n",
"A: ['Symptoms that indicate possible Cardiovascular Disease (CVD) may include, but are not limited to, chest pain, shortness of breath, fatigue, dizziness, and palpitations. Additionally, factors such as high blood pressure, high cholesterol, diabetes, and obesity can also be signs of increased risk for CVD.']\n",
"\n",
"Q: What diseases are associated with Obesity?\n",
"A: ['Diseases associated with obesity include cardiovascular disease, cancer, and diabetes. Obesity can exacerbate these conditions and increase the risk of their occurrence.']\n",
"\n"
]
}
],
"source": [
"# Test questions\n",
"questions = [\n",
" \"What are common risk factors for Type 2 Diabetes?\",\n",
" \"What preventive measures reduce the risk of Hypertension?\",\n",
" \"What symptoms indicate possible Cardiovascular Disease?\",\n",
" \"What diseases are associated with Obesity?\"\n",
"]\n",
"\n",
"# Path to medical ontology\n",
"ontology_path = \"examples/python/ontology_input_example/enriched_medical_ontology_with_classes.owl\" # Update with your ontology path\n",
"\n",
"# Run with ontology\n",
"print(\"\\n--- Results WITH ontology ---\\n\")\n",
"await run_pipeline(ontology_path=ontology_path)\n",
"answers_with = await query_pipeline(questions)\n",
"for q, a in zip(questions, answers_with):\n",
" print(f\"Q: {q}\\nA: {a}\\n\")"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "3aa18f4cdd5ceff6",
"metadata": {
"ExecuteTime": {
"end_time": "2025-04-09T14:32:24.891560Z",
"start_time": "2025-04-09T14:30:47.863808Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"\n",
"\u001b[2m2025-08-27T13:57:25.168873\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mDeleted Kuzu database files at /Users/daulet/Desktop/dev/cognee-claude/cognee/.cognee_system/databases/cognee_graph_kuzu\u001b[0m [\u001b[0m\u001b[1m\u001b[34mcognee.shared.logging_utils\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:25.266675\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[0m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"--- Results WITHOUT ontology ---\n",
"\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"\n",
"\u001b[2m2025-08-27T13:57:25.420598\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mPipeline run started: `f4f6b83c-3555-5296-a812-107346770fbd`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_with_telemetry()\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:25.561245\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task started: `resolve_data_directories`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"User e0763f65-1749-42aa-8436-22b776b42bcf has registered.\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"\n",
"\u001b[2m2025-08-27T13:57:25.702415\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task started: `ingest_data`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:25.864741\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mReading PDF: /Users/daulet/Desktop/dev/cognee/examples/data/scientific_papers/nutrients-13-01241.pdf\u001b[0m [\u001b[0m\u001b[1m\u001b[34mcognee.infrastructure.loaders.external.pypdf_loader\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:26.013387\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task completed: `ingest_data`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:26.153761\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task completed: `resolve_data_directories`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:26.292634\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mPipeline run completed: `f4f6b83c-3555-5296-a812-107346770fbd`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_with_telemetry()\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:26.458350\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mPipeline run started: `f4f6b83c-3555-5296-a812-107346770fbd`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_with_telemetry()\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:26.606166\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task started: `resolve_data_directories`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:26.761724\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task started: `ingest_data`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:26.945575\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mReading PDF: /Users/daulet/Desktop/dev/cognee/examples/data/scientific_papers/TOJ-22-0073_152Mendoza.pdf\u001b[0m [\u001b[0m\u001b[1m\u001b[34mcognee.infrastructure.loaders.external.pypdf_loader\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:27.052394\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task completed: `ingest_data`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:27.201593\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task completed: `resolve_data_directories`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:27.360901\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mPipeline run completed: `f4f6b83c-3555-5296-a812-107346770fbd`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_with_telemetry()\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:27.532808\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mOntology file 'None' not found. No owl ontology will be attached to the graph.\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:27.561598\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mPipeline run started: `05779e2b-4ff1-5b13-8fc4-7fd789498ec4`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_with_telemetry()\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:27.722699\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task started: `classify_documents`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:27.871031\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task started: `check_permissions_on_dataset`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:28.023426\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_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:28.206266\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_base\u001b[0m]\u001b[0m\n",
"\u001b[92m14:57:28 - LiteLLM:INFO\u001b[0m: utils.py:3341 - \n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\n",
"\n",
"\u001b[1m\n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\u001b[0m\n",
"\u001b[92m14:57:28 - LiteLLM:INFO\u001b[0m: utils.py:3341 - \n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\n",
"\n",
"\u001b[1m\n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\u001b[0m\n",
"\u001b[92m14:57:28 - LiteLLM:INFO\u001b[0m: utils.py:3341 - \n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\n",
"\n",
"\u001b[1m\n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:49.514070\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",
"\n",
"\u001b[2m2025-08-27T13:57:49.515588\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",
"\n",
"\u001b[2m2025-08-27T13:57:49.516028\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",
"\n",
"\u001b[2m2025-08-27T13:57:49.516456\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",
"\n",
"\u001b[2m2025-08-27T13:57:49.516897\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",
"\n",
"\u001b[2m2025-08-27T13:57:49.517277\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",
"\n",
"\u001b[2m2025-08-27T13:57:49.517597\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",
"\n",
"\u001b[2m2025-08-27T13:57:49.518313\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",
"\n",
"\u001b[2m2025-08-27T13:57:49.518865\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",
"\n",
"\u001b[2m2025-08-27T13:57:49.519339\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",
"\n",
"\u001b[2m2025-08-27T13:57:49.519682\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",
"\n",
"\u001b[2m2025-08-27T13:57:49.520013\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'diet' in category 'classes'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:49.520298\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",
"\n",
"\u001b[2m2025-08-27T13:57:49.520547\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",
"\n",
"\u001b[2m2025-08-27T13:57:49.520885\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'date study received' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:49.521219\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'date study accepted' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:49.521484\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'date study published' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:49.521798\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'mortality' in category 'classes'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:49.522131\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",
"\n",
"\u001b[2m2025-08-27T13:57:49.522432\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",
"\n",
"\u001b[2m2025-08-27T13:57:49.522689\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",
"\n",
"\u001b[2m2025-08-27T13:57:49.523071\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",
"\n",
"\u001b[2m2025-08-27T13:57:49.523338\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",
"\n",
"\u001b[2m2025-08-27T13:57:49.523618\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",
"\n",
"\u001b[2m2025-08-27T13:57:49.523894\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",
"\n",
"\u001b[2m2025-08-27T13:57:49.524143\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",
"\n",
"\u001b[2m2025-08-27T13:57:49.524424\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",
"\n",
"\u001b[2m2025-08-27T13:57:49.524691\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'cardiovascular diseases' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:49.524970\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'cancer' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:49.525248\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",
"\n",
"\u001b[2m2025-08-27T13:57:49.525530\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",
"\n",
"\u001b[2m2025-08-27T13:57:49.525831\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",
"\n",
"\u001b[2m2025-08-27T13:57:49.526090\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'statistical measure' in category 'classes'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:49.526348\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'hazard ratio' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:49.526990\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'time unit' in category 'classes'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:49.527685\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'person-years' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:49.528244\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'time period' in category 'classes'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:49.528578\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'study duration' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:49.528876\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'cumulative incidence' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:49.529258\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",
"\n",
"\u001b[2m2025-08-27T13:57:49.529535\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'adult life' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:49.529802\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'chronic illness' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:49.530362\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",
"\n",
"\u001b[2m2025-08-27T13:57:49.530650\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'longitudinal studies' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:49.530924\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'mediterranean lifestyle' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:49.531196\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'research study' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:49.531491\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'self-reported data' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:49.531710\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'spanish population' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:49.531986\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'sample size' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:49.532239\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'response bias' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:49.532464\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'funding sources' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:49.532711\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'ethical approval' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:49.532977\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'informed consent' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:52.613755\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task started: `summarize_text`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\u001b[92m14:57:52 - LiteLLM:INFO\u001b[0m: utils.py:3341 - \n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\n",
"\n",
"\u001b[1m\n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\u001b[0m\n",
"\u001b[92m14:57:52 - LiteLLM:INFO\u001b[0m: utils.py:3341 - \n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\n",
"\n",
"\u001b[1m\n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\u001b[0m\n",
"\u001b[92m14:57:52 - LiteLLM:INFO\u001b[0m: utils.py:3341 - \n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\n",
"\n",
"\u001b[1m\n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:57:57.853670\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task started: `add_data_points`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:03.401474\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task completed: `add_data_points`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:03.562616\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task completed: `summarize_text`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:03.705987\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_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:03.855674\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_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:04.012884\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task completed: `check_permissions_on_dataset`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:04.169312\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task completed: `classify_documents`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:04.474564\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mPipeline run completed: `05779e2b-4ff1-5b13-8fc4-7fd789498ec4`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_with_telemetry()\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:04.632222\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mPipeline run started: `05779e2b-4ff1-5b13-8fc4-7fd789498ec4`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_with_telemetry()\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:04.779116\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task started: `classify_documents`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:04.932294\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task started: `check_permissions_on_dataset`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:05.105238\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_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:05.297050\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_base\u001b[0m]\u001b[0m\n",
"\u001b[92m14:58:05 - LiteLLM:INFO\u001b[0m: utils.py:3341 - \n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\n",
"\n",
"\u001b[1m\n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\u001b[0m\n",
"\u001b[92m14:58:05 - LiteLLM:INFO\u001b[0m: utils.py:3341 - \n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\n",
"\n",
"\u001b[1m\n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:29.909979\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",
"\n",
"\u001b[2m2025-08-27T13:58:29.912597\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",
"\n",
"\u001b[2m2025-08-27T13:58:29.913179\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",
"\n",
"\u001b[2m2025-08-27T13:58:29.913706\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",
"\n",
"\u001b[2m2025-08-27T13:58:29.914114\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",
"\n",
"\u001b[2m2025-08-27T13:58:29.914529\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",
"\n",
"\u001b[2m2025-08-27T13:58:29.914920\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'coffee' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:29.915255\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'health domain' in category 'classes'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:29.915646\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",
"\n",
"\u001b[2m2025-08-27T13:58:29.916079\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'disease' in category 'classes'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:29.916464\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",
"\n",
"\u001b[2m2025-08-27T13:58:29.916802\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'substance' in category 'classes'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:29.917174\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",
"\n",
"\u001b[2m2025-08-27T13:58:29.917500\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",
"\n",
"\u001b[2m2025-08-27T13:58:29.917880\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",
"\n",
"\u001b[2m2025-08-27T13:58:29.918233\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",
"\n",
"\u001b[2m2025-08-27T13:58:29.918754\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",
"\n",
"\u001b[2m2025-08-27T13:58:29.919133\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",
"\n",
"\u001b[2m2025-08-27T13:58:29.919446\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",
"\n",
"\u001b[2m2025-08-27T13:58:29.919786\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'health advisory' in category 'classes'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:29.920133\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'caffeine consumption during pregnancy' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:29.920442\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",
"\n",
"\u001b[2m2025-08-27T13:58:29.920789\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'myocardial infarction' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:29.921121\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",
"\n",
"\u001b[2m2025-08-27T13:58:29.921517\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'chemical compounds' in category 'classes'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:29.921853\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",
"\n",
"\u001b[2m2025-08-27T13:58:29.922179\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'medical condition' in category 'classes'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:29.922542\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",
"\n",
"\u001b[2m2025-08-27T13:58:29.922792\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'medical procedure' in category 'classes'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:29.923044\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'cardiac surgery' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:29.923349\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",
"\n",
"\u001b[2m2025-08-27T13:58:29.923688\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",
"\n",
"\u001b[2m2025-08-27T13:58:29.923894\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",
"\n",
"\u001b[2m2025-08-27T13:58:29.924157\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'ali-hassan-sayegh et al (2014)' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:29.924444\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'ding et al (2015)' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:29.924734\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'lopez-garcia et al (2008)' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:29.925225\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'de koning gans et al (2010)' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:29.925735\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'andersen et al (2006)' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:29.926028\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'kleemola et al (2000)' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:29.926485\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'kim et al (2019)' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:29.926770\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'chemical compound' in category 'classes'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:29.927582\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'blood pressure' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:29.927856\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",
"\n",
"\u001b[2m2025-08-27T13:58:29.928277\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mNo close match found for 'moderation' in category 'individuals'\u001b[0m [\u001b[0m\u001b[1m\u001b[34mOntologyAdapter\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:33.804451\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task started: `summarize_text`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\u001b[92m14:58:33 - LiteLLM:INFO\u001b[0m: utils.py:3341 - \n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\n",
"\n",
"\u001b[1m\n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\u001b[0m\n",
"\u001b[92m14:58:33 - LiteLLM:INFO\u001b[0m: utils.py:3341 - \n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\n",
"\n",
"\u001b[1m\n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:40.232682\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task started: `add_data_points`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:44.523716\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task completed: `add_data_points`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:44.668235\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task completed: `summarize_text`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:44.816078\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_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:44.967879\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_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:45.126329\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task completed: `check_permissions_on_dataset`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:45.296802\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mCoroutine task completed: `classify_documents`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_base\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:45.447048\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mPipeline run completed: `05779e2b-4ff1-5b13-8fc4-7fd789498ec4`\u001b[0m [\u001b[0m\u001b[1m\u001b[34mrun_tasks_with_telemetry()\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:45.774857\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mGraph projection completed: 102 nodes, 214 edges in 0.00s\u001b[0m [\u001b[0m\u001b[1m\u001b[34mCogneeGraph\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:46.269205\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mVector collection retrieval completed: Retrieved distances from 6 collections in 0.02s\u001b[0m [\u001b[0m\u001b[1m\u001b[34mcognee.shared.logging_utils\u001b[0m]\u001b[0m\n",
"\u001b[92m14:58:46 - LiteLLM:INFO\u001b[0m: utils.py:3341 - \n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\n",
"\n",
"\u001b[1m\n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:49.120648\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mGraph projection completed: 102 nodes, 214 edges in 0.00s\u001b[0m [\u001b[0m\u001b[1m\u001b[34mCogneeGraph\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:49.625746\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mVector collection retrieval completed: Retrieved distances from 6 collections in 0.01s\u001b[0m [\u001b[0m\u001b[1m\u001b[34mcognee.shared.logging_utils\u001b[0m]\u001b[0m\n",
"\u001b[92m14:58:49 - LiteLLM:INFO\u001b[0m: utils.py:3341 - \n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\n",
"\n",
"\u001b[1m\n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:53.119208\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mGraph projection completed: 102 nodes, 214 edges in 0.01s\u001b[0m [\u001b[0m\u001b[1m\u001b[34mCogneeGraph\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:53.576759\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mVector collection retrieval completed: Retrieved distances from 6 collections in 0.02s\u001b[0m [\u001b[0m\u001b[1m\u001b[34mcognee.shared.logging_utils\u001b[0m]\u001b[0m\n",
"\u001b[92m14:58:53 - LiteLLM:INFO\u001b[0m: utils.py:3341 - \n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\n",
"\n",
"\u001b[1m\n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:56.395448\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mGraph projection completed: 102 nodes, 214 edges in 0.01s\u001b[0m [\u001b[0m\u001b[1m\u001b[34mCogneeGraph\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:56.961329\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mVector collection retrieval completed: Retrieved distances from 6 collections in 0.02s\u001b[0m [\u001b[0m\u001b[1m\u001b[34mcognee.shared.logging_utils\u001b[0m]\u001b[0m\n",
"\u001b[92m14:58:57 - LiteLLM:INFO\u001b[0m: utils.py:3341 - \n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\n",
"\n",
"\u001b[1m\n",
"LiteLLM completion() model= gpt-4o-mini; provider = openai\u001b[0m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Q: What are common risk factors for Type 2 Diabetes?\n",
"A: ['Common risk factors for Type 2 Diabetes include:\\n1. High body mass index (BMI) \\n2. Physical inactivity \\n3. Poor diet (such as low adherence to a Mediterranean diet)\\n4. Smoking\\n5. Age (increased risk with older age)\\n6. Family history of diabetes\\n7. High blood pressure\\n8. High blood cholesterol\\n9. Waist circumference (indicating abdominal obesity)\\n10. Presence of chronic diseases (e.g., cardiovascular diseases, hypertension)']\n",
"\n",
"Q: What preventive measures reduce the risk of Hypertension?\n",
"A: ['Preventive measures to reduce the risk of hypertension include:\\n1. **Moderate Coffee Consumption**: Studies suggest that moderate coffee intake may lower the risk of developing hypertension.\\n2. **Diet and Lifestyle**: Adopting a healthy diet, particularly one resembling the Mediterranean diet, and maintaining a healthy lifestyle plays a crucial role in cardiovascular health.\\n3. **Managing Genetics and Smoking Status**: Outcomes of coffee consumption on blood pressure may vary based on genetic factors, especially those related to caffeine metabolism, and smoking habits should be considered.']\n",
"\n",
"Q: What symptoms indicate possible Cardiovascular Disease?\n",
"A: ['Symptoms indicating possible cardiovascular disease may include: \\n- Chest pain or discomfort (angina) \\n- Shortness of breath \\n- Fatigue or weakness \\n- Palpitations or irregular heartbeat \\n- Dizziness or fainting \\n- Swelling in the legs, ankles, or feet \\n- Pain or numbness in the arms or legs. \\nFurther evaluation by a healthcare provider is essential for accurate diagnosis and treatment.']\n",
"\n",
"Q: What diseases are associated with Obesity?\n",
"A: ['Diseases associated with obesity include cardiovascular diseases, hypertension, and type 2 diabetes. Obesity is linked with an increased risk for these conditions, which can lead to complications in heart health and overall mortality.']\n",
"\n"
]
}
],
"source": [
"# Run without ontology\n",
"print(\"\\n--- Results WITHOUT ontology ---\\n\")\n",
"await run_pipeline()\n",
"answers_without = await query_pipeline(questions)\n",
"for q, a in zip(questions, answers_without):\n",
" print(f\"Q: {q}\\nA: {a}\\n\")"
]
},
{
"cell_type": "markdown",
"id": "c60533d2423acdb0",
"metadata": {},
"source": [
"## Visualizing the Knowledge Graph\n",
"\n",
"Let's visualize how our ontology connects different medical concepts:"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "36ee2a360f47a054",
"metadata": {
"ExecuteTime": {
"end_time": "2025-04-09T15:25:33.512697Z",
"start_time": "2025-04-09T15:25:33.471854Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"\n",
"\u001b[2m2025-08-27T13:58:58.679995\u001b[0m [\u001b[32m\u001b[1minfo \u001b[0m] \u001b[1mGraph visualization saved as /Users/daulet/graph_visualization.html\u001b[0m [\u001b[0m\u001b[1m\u001b[34mcognee.shared.logging_utils\u001b[0m]\u001b[0m\n",
"\n",
"\u001b[2m2025-08-27T13:58:58.682148\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\n"
]
},
{
"data": {
"text/plain": [
"'/Users/daulet/graph_visualization.html'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import webbrowser\n",
"import os\n",
"from cognee.api.v1.visualize.visualize import visualize_graph\n",
"html = await visualize_graph()\n",
"home_dir = os.path.expanduser(\"~\")\n",
"html_file = os.path.join(home_dir, \"graph_visualization.html\")\n",
"display(html_file)\n",
"webbrowser.open(f\"file://{html_file}\")"
]
},
{
"cell_type": "markdown",
"id": "ff39326921b75273",
"metadata": {},
"source": [
"## Understanding the Results\n",
"\n",
"The demonstration above shows how ontologies enhance our analysis by:\n",
"\n",
"1. **Making Connections**: \n",
" - Linking related medical concepts even when not explicitly stated\n",
" - Identifying relationships between symptoms, diseases, and risk factors\n",
"\n",
"2. **Standardizing Terms**: \n",
" - Unifying different ways of referring to the same medical condition\n",
" - Ensuring consistent terminology across documents\n",
"\n",
"3. **Enabling Inference**: \n",
" - Drawing conclusions based on ontological relationships\n",
" - Discovering implicit connections in the data\n",
"\n",
"## Next Steps\n",
"\n",
"To learn more about Cognee and ontologies:\n",
"1. Check out the [Cognee documentation](https://docs.cognee.ai/)\n",
"2. Explore more examples in the `examples` directory\n",
"3. Try creating your own domain-specific ontology\n",
"\n",
"Remember to:\n",
"- 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"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8d2a0fe555a7bc0f",
"metadata": {},
"outputs": [
{
"ename": "",
"evalue": "",
"output_type": "error",
"traceback": [
"\u001b[1;31mThe Kernel crashed while executing code in the current cell or a previous cell. \n",
"\u001b[1;31mPlease review the code in the cell(s) to identify a possible cause of the failure. \n",
"\u001b[1;31mClick <a href='https://aka.ms/vscodeJupyterKernelCrash'>here</a> for more info. \n",
"\u001b[1;31mView Jupyter <a href='command:jupyter.viewOutput'>log</a> for further details."
]
}
],
"source": [
"# Only exit in interactive mode, not during GitHub Actions\n",
"import os\n",
"\n",
"# Skip exit if we're running in GitHub Actions\n",
"if not os.environ.get('GITHUB_ACTIONS'):\n",
" print(\"Exiting kernel to clean up resources...\")\n",
" os._exit(0)\n",
"else:\n",
" print(\"Skipping kernel exit - running in GitHub Actions\")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": ".venv",
"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.12.7"
}
},
"nbformat": 4,
"nbformat_minor": 5
}