Examples

Working code samples, datasets, and complete implementations you can copy and use.

Examples provide ready-to-use code and data that demonstrate TrustGraph features in action. Unlike guides that teach you how to do something, examples show you what working implementations look like.

What’s in This Section?

Examples include:

  • Complete working code samples
  • Sample datasets and data generators
  • Integration examples with real systems
  • Reference implementations

Not sure if you’re in the right place?

Available Examples

Sample Data

  • Sample Data - Example datasets for testing and development
    • Pre-built knowledge graphs
    • Sample documents (PDFs, text files)
    • Test data generators

Working Code

Planned Examples

Work in Progress The following examples are planned for future releases:

  • Tutorials - Complete end-to-end learning paths
  • Integrations - Real-world system integration examples
    • LangChain integration
    • LlamaIndex integration
    • Custom API integration
    • Database connectors

How to Use Examples

1. Browse Examples

Find an example that matches your use case

2. Copy the Code

Examples are designed to be copied and adapted

3. Run & Modify

Test the example, then customize for your needs

4. Refer to Guides

For deeper understanding, see related How-to Guides

Example Categories

By Use Case

Use Case Example
Testing TrustGraph Sample Data
Natural language queries NLP to Structured Queries

Examples vs. Guides: What’s the Difference?

Examples Guides
What: Working code to copy How: Step-by-step instructions
Goal: Show implementation Goal: Teach a task
Format: Complete code samples Format: Instructional steps
When to use: Need code quickly When to use: Learning workflow

Example scenario:

  • Guide: “How to Extract Entities from PDFs” - teaches the process
  • Example: “PDF Entity Extraction Sample” - provides working code

Sample Datasets

The Sample Data section provides:

  • Pre-loaded knowledge graphs for testing
  • Sample PDFs and documents
  • Data generators for creating test data
  • Benchmark datasets

Perfect for:

  • Testing your TrustGraph installation
  • Learning query patterns
  • Benchmarking performance
  • Developing and testing features

Contributing Examples

Have a great example to share? We welcome contributions!

See Contributing Guidelines for:

  • Example submission guidelines
  • Code style requirements
  • Documentation standards
  • Licensing information

Table of contents