Skip to content

Add a runnable example target + end-to-end walkthrough docs #5

Description

@ronaldmannak

Motivation

The library has no runnable entry point, which makes it hard to adopt and to sanity-check the full pipeline. A small example executable doubles as living documentation.

Scope

  • Add an executable target (e.g. graphrag-demo) in Package.swift under Sources/graphrag-demo/.
  • Demonstrate the full flow: build a graph from sample text → asklightRAG().askdetectCommunities() and print communities.
  • Support both the offline path (default HashEmbedder + pattern extractor) and an Ollama path via a flag/env var.
  • Add a short "Walkthrough" section to the README linking to the example.

Files (parallel-safe)

Package.swift, new Sources/graphrag-demo/, README.md. No overlap with library source changes.

Acceptance criteria

  • swift run graphrag-demo runs fully offline and prints an answer, sources, and detected communities.
  • README documents how to run it (offline and with Ollama).
  • CI green (build includes the new target).

Context: follow-up to PRs #2 / #3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions