diff --git a/notebooks/tutorial.ipynb b/notebooks/tutorial.ipynb index 64c3e6697..400996dce 100644 --- a/notebooks/tutorial.ipynb +++ b/notebooks/tutorial.ipynb @@ -62,7 +62,7 @@ "metadata": {}, "cell_type": "markdown", "source": [ - "# Prelinimiaries\n", + "# Preliminaries\n", "\n", "Cognee relies heavily on async functions.\n", "We need `nest_asyncio` so `await` works in this notebook." @@ -70,7 +70,12 @@ "id": "2a5dac2c6fdc7ca7" }, { - "metadata": {}, + "metadata": { + "ExecuteTime": { + "end_time": "2025-09-07T14:35:00.836706Z", + "start_time": "2025-09-07T14:35:00.832646Z" + } + }, "cell_type": "code", "source": [ "import nest_asyncio\n", @@ -78,7 +83,17 @@ ], "id": "20cb02b49e3c53e2", "outputs": [], - "execution_count": null + "execution_count": 1 + }, + { + "metadata": {}, + "cell_type": "markdown", + "source": [ + "To strike the balanace between speed, cost, anc quality, we recommend using OpenAI's `4o-mini` model; make sure your `.env` file contains this line:\n", + "\n", + "```LLM_MODEL=\"gpt-4o-mini\"```" + ], + "id": "30e66c894fb4cfd5" }, { "metadata": {}, @@ -87,7 +102,12 @@ "id": "45e1caaec20c9518" }, { - "metadata": {}, + "metadata": { + "ExecuteTime": { + "end_time": "2025-09-07T14:35:03.910260Z", + "start_time": "2025-09-07T14:35:00.938966Z" + } + }, "cell_type": "code", "source": [ "import cognee\n", @@ -108,8 +128,34 @@ " print('📦 Status: INSTALLED PACKAGE')" ], "id": "9386ecb596860399", - "outputs": [], - "execution_count": null + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "\u001B[2m2025-09-07T14:35:01.883464\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mDeleted old log file: /Users/lazar/PycharmProjects/cognee/logs/2025-09-07_14-54-27.log\u001B[0m [\u001B[0m\u001B[1m\u001B[34mcognee.shared.logging_utils\u001B[0m]\u001B[0m\n", + "/Users/lazar/PycharmProjects/cognee/.venv/lib/python3.12/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", + " from .autonotebook import tqdm as notebook_tqdm\n", + "\n", + "\u001B[2m2025-09-07T14:35:02.487548\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mLogging initialized \u001B[0m [\u001B[0m\u001B[1m\u001B[34mcognee.shared.logging_utils\u001B[0m]\u001B[0m \u001B[36mcognee_version\u001B[0m=\u001B[35m0.2.4-local\u001B[0m \u001B[36mdatabase_path\u001B[0m=\u001B[35m/Users/lazar/PycharmProjects/cognee/cognee/.cognee_system/databases\u001B[0m \u001B[36mgraph_database_name\u001B[0m=\u001B[35m\u001B[0m \u001B[36mos_info\u001B[0m=\u001B[35m'Darwin 24.5.0 (Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:29 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T6030)'\u001B[0m \u001B[36mpython_version\u001B[0m=\u001B[35m3.12.8\u001B[0m \u001B[36mrelational_config\u001B[0m=\u001B[35mcognee_db\u001B[0m \u001B[36mstructlog_version\u001B[0m=\u001B[35m25.4.0\u001B[0m \u001B[36mvector_config\u001B[0m=\u001B[35mlancedb\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:35:02.487958\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mDatabase storage: /Users/lazar/PycharmProjects/cognee/cognee/.cognee_system/databases\u001B[0m [\u001B[0m\u001B[1m\u001B[34mcognee.shared.logging_utils\u001B[0m]\u001B[0m\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "🔍 Quick Cognee Import Check\n", + "==============================\n", + "📍 Cognee location: /Users/lazar/PycharmProjects/cognee/cognee/__init__.py\n", + "📁 Package directory: /Users/lazar/PycharmProjects/cognee/cognee\n", + "📦 Status: INSTALLED PACKAGE\n" + ] + } + ], + "execution_count": 2 }, { "metadata": {}, @@ -118,7 +164,12 @@ "id": "76895c6570d1a4dc" }, { - "metadata": {}, + "metadata": { + "ExecuteTime": { + "end_time": "2025-09-07T14:35:03.921217Z", + "start_time": "2025-09-07T14:35:03.918659Z" + } + }, "cell_type": "code", "source": [ "import sys\n", @@ -137,8 +188,16 @@ "print(f\"📁 Project root: {project_root_str}\")" ], "id": "19e74e6b691020db", - "outputs": [], - "execution_count": null + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "📁 Project root: /Users/lazar/PycharmProjects/cognee\n" + ] + } + ], + "execution_count": 3 }, { "metadata": {}, @@ -147,21 +206,35 @@ "id": "af584b935cbdc8d" }, { - "metadata": {}, + "metadata": { + "ExecuteTime": { + "end_time": "2025-09-07T14:35:06.194073Z", + "start_time": "2025-09-07T14:35:03.929446Z" + } + }, "cell_type": "code", "source": [ "await cognee.prune.prune_data()\n", "await cognee.prune.prune_system(metadata=True)" ], "id": "dd47383aa9519465", - "outputs": [], - "execution_count": null + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "\u001B[2m2025-09-07T14:35:06.190189\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" + ] + } + ], + "execution_count": 4 }, { "metadata": {}, "cell_type": "markdown", "source": [ - "### Exploring Guido's Python Contributions\n", + "### First data ingestion: Exploring Guido's Python Contributions\n", "\n", "We'll begin with a document that contains detailed PRs and commits from Guido van Rossum's work on mypy and CPython, showing real-world examples of Python's creator solving type system and language design challenges.\n", "\n", @@ -170,28 +243,190 @@ "id": "93c9783037715026" }, { - "metadata": {}, + "metadata": { + "ExecuteTime": { + "end_time": "2025-09-07T14:39:53.511862Z", + "start_time": "2025-09-07T14:35:06.228778Z" + } + }, "cell_type": "code", "source": [ "import cognee\n", "result = await cognee.add(\n", " \"file://data/guido_contributions.json\",\n", - " node_set=[\"guido\"]\n", + " node_set=[\"guido_data\"]\n", ")\n", "await cognee.cognify(temporal_cognify=True)\n", "results = await cognee.search(\"Show me commits\")" ], "id": "b8743ed520b4de37", - "outputs": [], - "execution_count": null + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "User 666b4a6d-34ef-4221-aba2-68a64a7b1eaa has registered.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "\u001B[1mEmbeddingRateLimiter initialized: enabled=False, requests_limit=60, interval_seconds=60\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:35:09.623496\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mPipeline run started: `576f15b1-6366-5079-b586-01bf92a45a1d`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_with_telemetry()\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:35:09.624579\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-09-07T14:35:09.625619\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-09-07T14:35:09.646868\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRegistered loader: pypdf_loader\u001B[0m [\u001B[0m\u001B[1m\u001B[34mcognee.infrastructure.loaders.LoaderEngine\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:35:09.647515\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRegistered loader: text_loader\u001B[0m [\u001B[0m\u001B[1m\u001B[34mcognee.infrastructure.loaders.LoaderEngine\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:35:09.647982\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRegistered loader: image_loader\u001B[0m [\u001B[0m\u001B[1m\u001B[34mcognee.infrastructure.loaders.LoaderEngine\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:35:09.648557\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRegistered loader: audio_loader\u001B[0m [\u001B[0m\u001B[1m\u001B[34mcognee.infrastructure.loaders.LoaderEngine\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:35:09.649816\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRegistered loader: unstructured_loader\u001B[0m [\u001B[0m\u001B[1m\u001B[34mcognee.infrastructure.loaders.LoaderEngine\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:35:09.660104\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-09-07T14:35:09.660527\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-09-07T14:35:09.661133\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mPipeline run completed: `576f15b1-6366-5079-b586-01bf92a45a1d`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_with_telemetry()\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:35:09.685106\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mPipeline run started: `be77ae78-61ae-5066-8df8-04ba903dbe6d`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_with_telemetry()\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:35:09.685571\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-09-07T14:35:09.685911\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-09-07T14:35:09.693221\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-09-07T14:35:09.721431\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `extract_events_and_timestamps`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:35:24.808308\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `extract_knowledge_graph_from_events`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:36:10.235598\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-09-07T14:36:18.963698\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 202 nodes and 335 edges in 0.04 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:36:20.167605\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-09-07T14:36:20.168080\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `extract_knowledge_graph_from_events`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:36:20.168371\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `extract_events_and_timestamps`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:36:20.185430\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `extract_events_and_timestamps`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:36:22.765687\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `extract_knowledge_graph_from_events`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:36:22.767063\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-09-07T14:36:24.039208\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 203 nodes and 337 edges in 0.02 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:36:25.499226\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-09-07T14:36:25.500201\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `extract_knowledge_graph_from_events`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:36:25.500492\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `extract_events_and_timestamps`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:36:25.514153\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `extract_events_and_timestamps`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:36:27.574764\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `extract_knowledge_graph_from_events`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:36:27.576271\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-09-07T14:36:28.552555\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 204 nodes and 339 edges in 0.04 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:36:29.917238\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-09-07T14:36:29.917690\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `extract_knowledge_graph_from_events`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:36:29.918038\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `extract_events_and_timestamps`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:36:29.931887\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `extract_events_and_timestamps`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:36:50.418281\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `extract_knowledge_graph_from_events`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:37:31.380478\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-09-07T14:37:36.217182\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 332 nodes and 535 edges in 0.04 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:37:37.608817\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-09-07T14:37:37.610610\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `extract_knowledge_graph_from_events`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:37:37.610882\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `extract_events_and_timestamps`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:37:37.623203\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `extract_events_and_timestamps`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:37:59.333307\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `extract_knowledge_graph_from_events`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:38:30.317584\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-09-07T14:38:36.143492\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 415 nodes and 697 edges in 0.05 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:38:37.703572\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-09-07T14:38:37.704043\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `extract_knowledge_graph_from_events`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:38:37.704434\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `extract_events_and_timestamps`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:38:37.705143\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `extract_events_and_timestamps`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:39:07.687322\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `extract_knowledge_graph_from_events`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:39:41.229696\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-09-07T14:39:45.991597\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 513 nodes and 872 edges in 0.06 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:39:47.641833\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-09-07T14:39:47.642446\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `extract_knowledge_graph_from_events`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:39:47.642764\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `extract_events_and_timestamps`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:39:47.646206\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-09-07T14:39:47.646490\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-09-07T14:39:47.646738\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-09-07T14:39:47.647065\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mPipeline run completed: `be77ae78-61ae-5066-8df8-04ba903dbe6d`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_with_telemetry()\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:39:47.722293\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 513 nodes and 872 edges in 0.05 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:39:47.727445\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mGraph projection completed: 513 nodes, 872 edges in 0.05s\u001B[0m [\u001B[0m\u001B[1m\u001B[34mCogneeGraph\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:39:48.085263\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" + ] + } + ], + "execution_count": 5 }, { - "metadata": {}, + "metadata": { + "ExecuteTime": { + "end_time": "2025-09-07T14:39:53.561679Z", + "start_time": "2025-09-07T14:39:53.559528Z" + } + }, "cell_type": "code", "source": "print(results[0])", "id": "f08b362cbf12b398", - "outputs": [], - "execution_count": null + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Showing commits from the provided context.\n" + ] + } + ], + "execution_count": 6 }, { "metadata": {}, @@ -206,26 +441,81 @@ "id": "10d582d02ead905e" }, { - "metadata": {}, + "metadata": { + "ExecuteTime": { + "end_time": "2025-09-07T14:39:53.688017Z", + "start_time": "2025-09-07T14:39:53.598467Z" + } + }, "cell_type": "code", "source": [ "from cognee import visualize_graph\n", "await visualize_graph('./guido_contributions.html')" ], "id": "1fb068f422bda6cf", - "outputs": [], - "execution_count": null + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "\u001B[2m2025-09-07T14:39:53.671009\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 513 nodes and 872 edges in 0.06 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:39:53.676478\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mGraph visualization saved as ./guido_contributions.html\u001B[0m [\u001B[0m\u001B[1m\u001B[34mcognee.shared.logging_utils\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:39:53.677322\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mThe HTML file has been stored at path: ./guido_contributions.html\u001B[0m [\u001B[0m\u001B[1m\u001B[34mcognee.shared.logging_utils\u001B[0m]\u001B[0m\n" + ] + }, + { + "data": { + "text/plain": [ + "'\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
\\n \\n\\n \\n \\n \\n \\n \\n '" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "execution_count": 7 }, { - "metadata": {}, + "metadata": { + "ExecuteTime": { + "end_time": "2025-09-07T14:39:53.733197Z", + "start_time": "2025-09-07T14:39:53.729922Z" + } + }, "cell_type": "code", "source": [ "from IPython.display import IFrame, HTML, display\n", "display(IFrame(\"./guido_contributions.html\", width=\"100%\", height=\"500\"))" ], "id": "f24341c97d6eaccb", - "outputs": [], - "execution_count": null + "outputs": [ + { + "data": { + "text/plain": [ + "" + ], + "text/html": [ + "\n", + " \n", + " " + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "execution_count": 8 }, { "metadata": {}, @@ -245,11 +535,20 @@ { "metadata": {}, "cell_type": "markdown", - "source": "Now we'll add the remaining data and see how they connections emerge between Guido's contributions, Python best practices, and user conversations.", + "source": [ + "### Ingesting more data\n", + "\n", + "Now we'll add the remaining data and see how they connections emerge between Guido's contributions, Python best practices, and user conversations." + ], "id": "5e8d9094a09ae05d" }, { - "metadata": {}, + "metadata": { + "ExecuteTime": { + "end_time": "2025-09-07T14:40:48.589875Z", + "start_time": "2025-09-07T14:39:53.785054Z" + } + }, "cell_type": "code", "source": [ "await cognee.add(\"file://data/copilot_conversations.json\", node_set=[\"developer_data\"])\n", @@ -260,17 +559,201 @@ "await cognee.cognify(temporal_cognify=True)" ], "id": "5315318324968f0f", - "outputs": [], - "execution_count": null + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "\u001B[2m2025-09-07T14:39:53.829241\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mPipeline run started: `576f15b1-6366-5079-b586-01bf92a45a1d`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_with_telemetry()\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:39:53.829640\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-09-07T14:39:53.829940\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-09-07T14:39:53.843454\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-09-07T14:39:53.843823\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-09-07T14:39:53.844182\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mPipeline run completed: `576f15b1-6366-5079-b586-01bf92a45a1d`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_with_telemetry()\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:39:53.871709\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mPipeline run started: `576f15b1-6366-5079-b586-01bf92a45a1d`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_with_telemetry()\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:39:53.872071\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-09-07T14:39:53.872367\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-09-07T14:39:53.882151\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-09-07T14:39:53.882510\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-09-07T14:39:53.882809\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mPipeline run completed: `576f15b1-6366-5079-b586-01bf92a45a1d`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_with_telemetry()\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:39:53.912204\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mPipeline run started: `576f15b1-6366-5079-b586-01bf92a45a1d`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_with_telemetry()\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:39:53.912690\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-09-07T14:39:53.912959\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-09-07T14:39:53.923068\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-09-07T14:39:53.923361\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-09-07T14:39:53.923585\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mPipeline run completed: `576f15b1-6366-5079-b586-01bf92a45a1d`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_with_telemetry()\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:39:53.951487\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mPipeline run started: `576f15b1-6366-5079-b586-01bf92a45a1d`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_with_telemetry()\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:39:53.951861\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-09-07T14:39:53.952214\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-09-07T14:39:53.967297\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-09-07T14:39:53.967650\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-09-07T14:39:53.967914\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mPipeline run completed: `576f15b1-6366-5079-b586-01bf92a45a1d`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_with_telemetry()\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:39:53.992515\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mPipeline run started: `be77ae78-61ae-5066-8df8-04ba903dbe6d`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_with_telemetry()\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:39:53.992977\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-09-07T14:39:53.993474\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-09-07T14:39:53.994416\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mPipeline run started: `be77ae78-61ae-5066-8df8-04ba903dbe6d`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_with_telemetry()\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:39:53.994712\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-09-07T14:39:53.995079\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-09-07T14:39:53.995706\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mPipeline run started: `be77ae78-61ae-5066-8df8-04ba903dbe6d`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_with_telemetry()\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:39:53.997019\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-09-07T14:39:53.997301\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-09-07T14:39:53.998158\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mPipeline run started: `be77ae78-61ae-5066-8df8-04ba903dbe6d`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_with_telemetry()\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:39:53.998553\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-09-07T14:39:53.998864\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-09-07T14:39:54.013055\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-09-07T14:39:54.017852\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `extract_events_and_timestamps`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:39:54.022009\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-09-07T14:39:54.030806\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `extract_events_and_timestamps`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:39:54.036343\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-09-07T14:39:54.039116\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `extract_events_and_timestamps`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:39:54.039508\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-09-07T14:39:54.041717\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `extract_events_and_timestamps`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:39:55.849185\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `extract_knowledge_graph_from_events`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:39:55.849799\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-09-07T14:39:56.665144\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 516 nodes and 875 edges in 0.07 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:39:58.458740\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-09-07T14:39:58.459243\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `extract_knowledge_graph_from_events`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:39:58.459572\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `extract_events_and_timestamps`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:39:58.463783\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-09-07T14:39:58.464114\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-09-07T14:39:58.464420\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-09-07T14:39:58.464859\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mPipeline run completed: `be77ae78-61ae-5066-8df8-04ba903dbe6d`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_with_telemetry()\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:40:04.250313\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `extract_knowledge_graph_from_events`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:40:05.899016\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `extract_knowledge_graph_from_events`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:40:08.508985\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `extract_knowledge_graph_from_events`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:40:10.092969\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-09-07T14:40:12.744365\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 554 nodes and 922 edges in 0.06 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:40:14.420588\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-09-07T14:40:14.421023\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `extract_knowledge_graph_from_events`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:40:14.421274\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `extract_events_and_timestamps`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:40:14.424860\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-09-07T14:40:14.425243\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-09-07T14:40:14.425506\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-09-07T14:40:14.425824\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mPipeline run completed: `be77ae78-61ae-5066-8df8-04ba903dbe6d`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_with_telemetry()\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:40:32.133853\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-09-07T14:40:37.935452\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 647 nodes and 1090 edges in 0.07 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:40:39.961419\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-09-07T14:40:39.961913\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `extract_knowledge_graph_from_events`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:40:39.962156\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `extract_events_and_timestamps`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:40:39.965642\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-09-07T14:40:39.965922\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-09-07T14:40:39.966156\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-09-07T14:40:39.966623\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mPipeline run completed: `be77ae78-61ae-5066-8df8-04ba903dbe6d`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_with_telemetry()\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:40:41.064653\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-09-07T14:40:46.322105\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 784 nodes and 1335 edges in 0.08 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:40:48.573983\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-09-07T14:40:48.574420\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `extract_knowledge_graph_from_events`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:40:48.574696\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `extract_events_and_timestamps`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:40:48.578174\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-09-07T14:40:48.578472\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-09-07T14:40:48.578720\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-09-07T14:40:48.579015\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mPipeline run completed: `be77ae78-61ae-5066-8df8-04ba903dbe6d`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_with_telemetry()\u001B[0m]\u001B[0m\n" + ] + }, + { + "data": { + "text/plain": [ + "{UUID('06a9442f-fee9-51a8-a5b9-ea18d1b954b7'): PipelineRunCompleted(status='PipelineRunCompleted', pipeline_run_id=UUID('1de1aac8-5256-5aa5-afd4-260a0e840b9b'), dataset_id=UUID('06a9442f-fee9-51a8-a5b9-ea18d1b954b7'), dataset_name='main_dataset', payload=None, data_ingestion_info=[{'run_info': PipelineRunCompleted(status='PipelineRunCompleted', pipeline_run_id=UUID('1de1aac8-5256-5aa5-afd4-260a0e840b9b'), dataset_id=UUID('06a9442f-fee9-51a8-a5b9-ea18d1b954b7'), dataset_name='main_dataset', payload=None, data_ingestion_info=None), 'data_id': UUID('36e0aee3-1c79-5ba5-976d-743b572435b9')}, {'run_info': PipelineRunAlreadyCompleted(status='PipelineRunAlreadyCompleted', pipeline_run_id=UUID('1de1aac8-5256-5aa5-afd4-260a0e840b9b'), dataset_id=UUID('06a9442f-fee9-51a8-a5b9-ea18d1b954b7'), dataset_name='main_dataset', payload=None, data_ingestion_info=None), 'data_id': UUID('5e252445-7af3-5852-97be-2871ee963f76')}, {'run_info': PipelineRunCompleted(status='PipelineRunCompleted', pipeline_run_id=UUID('1de1aac8-5256-5aa5-afd4-260a0e840b9b'), dataset_id=UUID('06a9442f-fee9-51a8-a5b9-ea18d1b954b7'), dataset_name='main_dataset', payload=None, data_ingestion_info=None), 'data_id': UUID('617bb29d-15c4-59a8-8597-7225d4bbe26f')}, {'run_info': PipelineRunCompleted(status='PipelineRunCompleted', pipeline_run_id=UUID('1de1aac8-5256-5aa5-afd4-260a0e840b9b'), dataset_id=UUID('06a9442f-fee9-51a8-a5b9-ea18d1b954b7'), dataset_name='main_dataset', payload=None, data_ingestion_info=None), 'data_id': UUID('8d8fa539-17f2-54b2-9bd8-a355c13de413')}, {'run_info': PipelineRunCompleted(status='PipelineRunCompleted', pipeline_run_id=UUID('1de1aac8-5256-5aa5-afd4-260a0e840b9b'), dataset_id=UUID('06a9442f-fee9-51a8-a5b9-ea18d1b954b7'), dataset_name='main_dataset', payload=None, data_ingestion_info=None), 'data_id': UUID('a95a6a59-2543-5e19-bed0-dd4b5c5f1440')}])}" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "execution_count": 9 }, { - "metadata": {}, - "cell_type": "markdown", - "source": "", - "id": "98b9b613d6d11bc5" - }, - { - "metadata": {}, + "metadata": { + "ExecuteTime": { + "end_time": "2025-09-07T14:40:51.305617Z", + "start_time": "2025-09-07T14:40:48.605622Z" + } + }, "cell_type": "code", "source": [ "results = await cognee.search(\n", @@ -280,8 +763,28 @@ "print(results)" ], "id": "98b69c45db2fca3", - "outputs": [], - "execution_count": null + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "\u001B[2m2025-09-07T14:40:48.717540\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 784 nodes and 1335 edges in 0.10 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:40:48.723536\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mGraph projection completed: 784 nodes, 1335 edges in 0.11s\u001B[0m [\u001B[0m\u001B[1m\u001B[34mCogneeGraph\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:40:49.150849\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mVector collection retrieval completed: Retrieved distances from 6 collections in 0.03s\u001B[0m [\u001B[0m\u001B[1m\u001B[34mcognee.shared.logging_utils\u001B[0m]\u001B[0m\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "['Preparing answer about type hinting challenges and mypy/Guido approach...']\n" + ] + } + ], + "execution_count": 10 }, { "metadata": {}, @@ -298,6 +801,8 @@ "metadata": {}, "cell_type": "markdown", "source": [ + "### Memify\n", + "\n", "Let's now introduce the memory functions. These algorithms run on top of your semantic layer, connecting the dots and improving the search.\n", "\n", "Memify is customizable and can use any transformation you'd like to write. But it also requires" @@ -305,12 +810,144 @@ "id": "a1f4606bfed8fc45" }, { - "metadata": {}, + "metadata": { + "ExecuteTime": { + "end_time": "2025-09-07T14:43:42.390990Z", + "start_time": "2025-09-07T14:40:51.321301Z" + } + }, "cell_type": "code", "source": "await cognee.memify()", "id": "20234960f7566b15", - "outputs": [], - "execution_count": null + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "\u001B[2m2025-09-07T14:40:51.426773\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 784 nodes and 1335 edges in 0.08 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:40:51.432999\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mGraph projection completed: 784 nodes, 1335 edges in 0.08s\u001B[0m [\u001B[0m\u001B[1m\u001B[34mCogneeGraph\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:40:51.449998\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mPipeline run started: `3538f0d3-f111-5205-abf4-4cfda343756d`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_with_telemetry()\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:40:51.450407\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mAsync Generator task started: `extract_subgraph_chunks`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:40:51.450742\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `add_rule_associations`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:41:05.331800\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 788 nodes and 1338 edges in 0.09 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:41:07.730018\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 788 nodes and 1341 edges in 0.08 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:41:09.998799\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `add_rule_associations`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:41:09.999234\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `add_rule_associations`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:41:10.014853\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 4 nodes and 3 edges for NodeSet in 0.01 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:41:17.347059\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 790 nodes and 1343 edges in 0.09 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:41:19.354567\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 790 nodes and 1345 edges in 0.08 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:41:20.830388\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `add_rule_associations`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:41:20.830845\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `add_rule_associations`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:41:20.845333\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 6 nodes and 5 edges for NodeSet in 0.00 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:41:29.525183\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 793 nodes and 1348 edges in 0.10 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:41:31.837942\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 793 nodes and 1351 edges in 0.08 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:41:34.371498\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `add_rule_associations`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:41:34.372003\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `add_rule_associations`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:41:34.386997\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 9 nodes and 8 edges for NodeSet in 0.01 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:41:52.110870\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 797 nodes and 1355 edges in 0.09 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:41:54.662998\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 797 nodes and 1359 edges in 0.10 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:41:56.536947\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `add_rule_associations`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:41:56.537543\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `add_rule_associations`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:41:56.555702\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 13 nodes and 12 edges for NodeSet in 0.01 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:42:12.887813\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 800 nodes and 1362 edges in 0.12 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:42:15.248448\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 800 nodes and 1365 edges in 0.09 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:42:17.221284\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `add_rule_associations`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:42:17.221925\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `add_rule_associations`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:42:17.243052\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 16 nodes and 15 edges for NodeSet in 0.01 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:42:27.286546\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 803 nodes and 1368 edges in 0.09 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:42:29.381832\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 803 nodes and 1371 edges in 0.08 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:42:31.321887\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `add_rule_associations`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:42:31.322839\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `add_rule_associations`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:42:31.336200\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 19 nodes and 18 edges for NodeSet in 0.01 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:42:39.575903\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 806 nodes and 1374 edges in 0.10 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:42:41.989514\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 806 nodes and 1377 edges in 0.41 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:42:43.962812\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `add_rule_associations`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:42:43.963271\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `add_rule_associations`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:42:43.978252\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 22 nodes and 21 edges for NodeSet in 0.01 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:42:53.367959\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 809 nodes and 1380 edges in 0.09 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:42:55.300671\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 809 nodes and 1383 edges in 0.08 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:42:57.099099\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `add_rule_associations`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:42:57.099708\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `add_rule_associations`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:42:57.117196\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 25 nodes and 24 edges for NodeSet in 0.01 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:43:19.642215\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 813 nodes and 1387 edges in 0.09 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:43:21.652556\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 813 nodes and 1391 edges in 0.08 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:43:23.874571\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `add_rule_associations`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:43:23.875096\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task started: `add_rule_associations`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:43:23.889933\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 29 nodes and 28 edges for NodeSet in 0.01 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:43:38.330093\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 817 nodes and 1395 edges in 0.12 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:43:40.354659\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 817 nodes and 1399 edges in 0.08 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:43:42.377593\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mCoroutine task completed: `add_rule_associations`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:43:42.378288\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mAsync Generator task completed: `extract_subgraph_chunks`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_base\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:43:42.378593\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mPipeline run completed: `3538f0d3-f111-5205-abf4-4cfda343756d`\u001B[0m [\u001B[0m\u001B[1m\u001B[34mrun_tasks_with_telemetry()\u001B[0m]\u001B[0m\n" + ] + }, + { + "data": { + "text/plain": [ + "{UUID('06a9442f-fee9-51a8-a5b9-ea18d1b954b7'): PipelineRunCompleted(status='PipelineRunCompleted', pipeline_run_id=UUID('cc37b094-c41d-54fc-b569-a40a3709d579'), dataset_id=UUID('06a9442f-fee9-51a8-a5b9-ea18d1b954b7'), dataset_name='main_dataset', payload=None, data_ingestion_info=[{'run_info': PipelineRunCompleted(status='PipelineRunCompleted', pipeline_run_id=UUID('cc37b094-c41d-54fc-b569-a40a3709d579'), dataset_id=UUID('06a9442f-fee9-51a8-a5b9-ea18d1b954b7'), dataset_name='main_dataset', payload=None, data_ingestion_info=None)}])}" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "execution_count": 11 }, { "metadata": {}, @@ -330,7 +967,12 @@ "id": "a304033f9f0f5dcf" }, { - "metadata": {}, + "metadata": { + "ExecuteTime": { + "end_time": "2025-09-07T14:43:44.837614Z", + "start_time": "2025-09-07T14:43:42.465351Z" + } + }, "cell_type": "code", "source": [ "# Search for connections between your async patterns and Python philosophy\n", @@ -341,17 +983,90 @@ "print(\"Python Pattern Analysis:\", results)" ], "id": "518fa9b17a604657", - "outputs": [], - "execution_count": null + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "\u001B[2m2025-09-07T14:43:42.570204\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 817 nodes and 1399 edges in 0.09 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:43:42.576838\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mGraph projection completed: 817 nodes, 1399 edges in 0.10s\u001B[0m [\u001B[0m\u001B[1m\u001B[34mCogneeGraph\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:43:42.929319\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mVector collection retrieval completed: Retrieved distances from 6 collections in 0.03s\u001B[0m [\u001B[0m\u001B[1m\u001B[34mcognee.shared.logging_utils\u001B[0m]\u001B[0m\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Python Pattern Analysis: ['Preparing concise alignment analysis...']\n" + ] + } + ], + "execution_count": 12 }, { "metadata": {}, "cell_type": "markdown", - "source": "As we used `temporal_cognify` option for each cognification, we can ask time related questions, for example:", - "id": "c641b8b7e50dd2ae" + "source": [ + "### Nodeset filtering\n", + "\n", + "You may have noticed that we added different documents to different datasets. This allows us to narrow our retrieval at search time:" + ], + "id": "2c77c1582ab9fc32" + }, + { + "metadata": { + "ExecuteTime": { + "end_time": "2025-09-07T14:43:49.542281Z", + "start_time": "2025-09-07T14:43:44.852455Z" + } + }, + "cell_type": "code", + "source": [ + "from cognee.modules.engine.models.node_set import NodeSet\n", + "results = await cognee.search(\n", + " query_text= \"How should variables be named?\",\n", + " query_type=cognee.SearchType.GRAPH_COMPLETION,\n", + " node_type=NodeSet,\n", + " node_name=['principles_data']\n", + ")" + ], + "id": "c64036c03abe41e7", + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "\u001B[2m2025-09-07T14:43:44.878134\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 5 nodes and 6 edges for NodeSet in 0.01 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:43:44.878868\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mGraph projection completed: 5 nodes, 6 edges in 0.01s\u001B[0m [\u001B[0m\u001B[1m\u001B[34mCogneeGraph\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:43:45.578030\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" + ] + } + ], + "execution_count": 13 }, { "metadata": {}, + "cell_type": "markdown", + "source": [ + "### Temporal graphs\n", + "\n", + "As we used `temporal_cognify` option for each cognification, we can ask time related questions, for example:" + ], + "id": "c641b8b7e50dd2ae" + }, + { + "metadata": { + "ExecuteTime": { + "end_time": "2025-09-07T14:43:55.278031Z", + "start_time": "2025-09-07T14:43:49.555704Z" + } + }, "cell_type": "code", "source": [ "await cognee.search(\n", @@ -360,22 +1075,100 @@ ")" ], "id": "28e7d5a75e076b8f", - "outputs": [], - "execution_count": null + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "\u001B[2m2025-09-07T14:43:51.896018\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mNo timestamps identified based on the query, performing retrieval using triplet search on events and entities.\u001B[0m [\u001B[0m\u001B[1m\u001B[34mcognee.shared.logging_utils\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:43:52.009621\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 817 nodes and 1399 edges in 0.10 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:43:52.016085\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mGraph projection completed: 817 nodes, 1399 edges in 0.10s\u001B[0m [\u001B[0m\u001B[1m\u001B[34mCogneeGraph\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:43:52.426193\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mVector collection retrieval completed: Retrieved distances from 6 collections in 0.03s\u001B[0m [\u001B[0m\u001B[1m\u001B[34mcognee.shared.logging_utils\u001B[0m]\u001B[0m\n" + ] + }, + { + "data": { + "text/plain": [ + "[\"Using the provided context, here is a brief summary of what we can learn from Guido's contributions in 2025:\"]" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "execution_count": 14 }, { "metadata": {}, "cell_type": "markdown", - "source": "Hm, maybe we are unhappy with the result and want to give feedback to the system so it doesn't give us a bad answer again", + "source": [ + "### Feedback loops\n", + "\n", + "Note that when you search, you can enable storing of results:" + ], "id": "ec6cf074a6c272ab" }, { - "metadata": {}, + "metadata": { + "ExecuteTime": { + "end_time": "2025-09-07T14:43:58.472950Z", + "start_time": "2025-09-07T14:43:55.288993Z" + } + }, "cell_type": "code", - "source": "", + "source": [ + "answer = await cognee.search(\n", + " query_type=cognee.SearchType.GRAPH_COMPLETION,\n", + " query_text=\"What is the most zen thing about Python?\",\n", + " save_interaction=True, # This enables feedback later\n", + ")" + ], "id": "67dec85a658aad76", + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "\u001B[2m2025-09-07T14:43:55.438956\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mRetrieved 817 nodes and 1399 edges in 0.10 seconds\u001B[0m [\u001B[0m\u001B[1m\u001B[34mNeo4jAdapter\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:43:55.456944\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mGraph projection completed: 817 nodes, 1399 edges in 0.12s\u001B[0m [\u001B[0m\u001B[1m\u001B[34mCogneeGraph\u001B[0m]\u001B[0m\n", + "\n", + "\u001B[2m2025-09-07T14:43:55.823583\u001B[0m [\u001B[32m\u001B[1minfo \u001B[0m] \u001B[1mVector collection retrieval completed: Retrieved distances from 6 collections in 0.03s\u001B[0m [\u001B[0m\u001B[1m\u001B[34mcognee.shared.logging_utils\u001B[0m]\u001B[0m\n" + ] + } + ], + "execution_count": 15 + }, + { + "metadata": {}, + "cell_type": "markdown", + "source": "This enables giving feedback, that itself can also be stored in the graph and will be included in future searches:", + "id": "2f64d90e6dadaefb" + }, + { + "metadata": { + "ExecuteTime": { + "end_time": "2025-09-07T14:44:00.503091Z", + "start_time": "2025-09-07T14:43:58.480893Z" + } + }, + "cell_type": "code", + "source": [ + "feedback = await cognee.search(\n", + " query_type=cognee.SearchType.FEEDBACK,\n", + " query_text=\"Last result was useful, I like code that complies with best practices.\",\n", + " last_k=1,\n", + ")" + ], + "id": "870149ea58fd109c", "outputs": [], - "execution_count": null + "execution_count": 16 } ], "metadata": {