<!-- .github/pull_request_template.md -->
## Description
<!--
Please provide a clear, human-generated description of the changes in
this PR.
DO NOT use AI-generated descriptions. We want to understand your thought
process and reasoning.
-->
## Type of Change
<!-- Please check the relevant option -->
- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [x] Code refactoring
- [ ] Performance improvement
- [ ] Other (please specify):
## Screenshots/Videos (if applicable)
<!-- Add screenshots or videos to help explain your changes -->
## Pre-submission Checklist
<!-- Please check all boxes that apply before submitting your PR -->
- [ ] **I have tested my changes thoroughly before submitting this PR**
- [ ] **This PR contains minimal changes necessary to address the
issue/feature**
- [ ] My code follows the project's coding standards and style
guidelines
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have added necessary documentation (if applicable)
- [ ] All new and existing tests pass
- [ ] I have searched existing PRs to ensure this change hasn't been
submitted already
- [ ] I have linked any relevant issues in the description
- [ ] My commits have clear and descriptive messages
## DCO Affirmation
I affirm that all code in every commit of this pull request conforms to
the terms of the Topoteretes Developer Certificate of Origin.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Documentation**
* Deprecated legacy examples and added a migration guide mapping old
paths to new locations
* Added a comprehensive new-examples README detailing configurations,
pipelines, demos, and migration notes
* **New Features**
* Added many runnable examples and demos: database configs,
embedding/LLM setups, permissions and access-control, custom pipelines
(organizational, product recommendation, code analysis, procurement),
multimedia, visualization, temporal/ontology demos, and a local UI
starter
* **Chores**
* Updated CI/test entrypoints to use the new-examples layout
<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: lxobr <122801072+lxobr@users.noreply.github.com>
66 lines
3.7 KiB
Markdown
66 lines
3.7 KiB
Markdown
# Cognee Examples
|
|
|
|
## 📁 Structure
|
|
|
|
| Folder | Purpose |
|
|
|--------|---------|
|
|
| `configurations/` | Database, LLM, embedding, and permission setups |
|
|
| `custom_pipelines/` | Building custom memory pipelines |
|
|
| `demos/` | Feature demos and getting started examples |
|
|
|
|
## 🔧 Configurations
|
|
|
|
| Path | Description |
|
|
|------|-------------|
|
|
| `database_examples/chromadb_vector_database_configuration.py` | ChromaDB vector database |
|
|
| `database_examples/kuzu_graph_database_configuration.py` | KuzuDB graph database |
|
|
| `database_examples/neo4j_graph_database_configuration.py` | Neo4j graph database |
|
|
| `database_examples/neptune_analytics_aws_database_configuration.py` | AWS Neptune Analytics |
|
|
| `database_examples/pgvector_postgres_vector_database_configuration.py` | PostgreSQL with PGVector |
|
|
| `database_examples/s3_storage_configuration.py` | Amazon S3 storage |
|
|
| `llm_configurations/openai_setup.py` | OpenAI LLM setup |
|
|
| `llm_configurations/azure_openai_setup.py` | Azure OpenAI LLM setup |
|
|
| `embedding_configurations/openai_setup.py` | OpenAI embeddings |
|
|
| `embedding_configurations/azure_openai_setup.py` | Azure OpenAI embeddings |
|
|
| `structured_output_configurations.py/baml_setup.py` | BAML structured output |
|
|
| `structured_output_configurations.py/litellm_intructor_setup.py` | LiteLLM Instructor setup |
|
|
| `permissions_example/` | Multi-user access control (with sample PDF) |
|
|
| `distributed_execution_with_modal_example.py` | Scale with Modal.com |
|
|
|
|
## 🔄 Custom Pipelines
|
|
|
|
| Path | Description |
|
|
|------|-------------|
|
|
| `custom_cognify_pipeline_example.py` | Customize cognify pipelines |
|
|
| `memify_coding_agent_rule_extraction_example.py` | Extract rules from conversations |
|
|
| `relational_database_to_knowledge_graph_migration_example.py` | SQL to knowledge graph |
|
|
| `agentic_reasoning_procurement_example.py` | AI procurement assistant |
|
|
| `code_graph_repository_analysis_example.py` | Code repository analysis |
|
|
| `dynamic_steps_resume_analysis_hr_example.py` | CV/resume filtering |
|
|
| `organizational_hierarchy/` | Org structure graphs (with JSON data) |
|
|
| `organizational_hierarchy/organizational_hierarchy_pipeline_low_level_example.py` | Low-level pipeline variant |
|
|
| `product_recommendation/` | Recommendation system (with customer data) |
|
|
|
|
## 🎯 Demos
|
|
|
|
| Path | Description |
|
|
|------|-------------|
|
|
| `simple_default_cognee_pipelines_example.py` | Default pipeline usage ★ |
|
|
| `simple_document_qa/` | Document Q&A (with alice_in_wonderland.txt) |
|
|
| `core_features_getting_started_example.py` | Intro to Cognee |
|
|
| `multimedia_processing/` | Audio/image processing (with media files) |
|
|
| `ontology_reference_vocabulary/` | Ontology as vocabulary (with OWL file) |
|
|
| `ontology_medical_comparison/` | Medical ontology comparison (with papers + OWL) |
|
|
| `web_url_content_ingestion_example.py` | Extract from web pages and ingest directly to memory |
|
|
| `temporal_awareness_example.py` | Time-based queries |
|
|
| `retrievers_and_search_examples.py` | Retriever patterns and search types guide |
|
|
| `feedback_enrichment_minimal_example.py` | User feedback enrichment |
|
|
| `nodeset_memory_grouping_with_tags_example.py` | Memory grouping with tags |
|
|
| `weighted_edges_relationships_example.py` | Weighted edge relationships |
|
|
| `dynamic_multiple_weighted_edges_example.py` | Multiple weighted edges |
|
|
| `custom_graph_model_entity_schema_definition.py` | Custom entity schemas ★ |
|
|
| `graph_visualization_example.py` | Visualize knowledge graphs |
|
|
| `conversation_session_persistence_example.py` | Session persistence |
|
|
| `custom_prompt_guide.py` | Custom prompts for extraction |
|
|
| `direct_llm_call_for_structured_output_example.py` | Direct LLM structured output |
|
|
| `start_local_ui_frontend_example.py` | Launch Cognee UI |
|