62 4 months ago

cap (cardano analytics platform) is a specialized SPARQL query generator powered by in-context learning on the Cardano blockchain ontology. It transforms natural language questions about Cardano's blockchain into SPARQL queries.

tools thinking
ollama run mobr/cap

Applications

Claude Code
Claude Code ollama launch claude --model mobr/cap
OpenClaw
OpenClaw ollama launch openclaw --model mobr/cap
Hermes Agent
Hermes Agent ollama launch hermes --model mobr/cap
Codex
Codex ollama launch codex --model mobr/cap
OpenCode
OpenCode ollama launch opencode --model mobr/cap

Models

View all →

1 model

cap:latest

9.3GB · 40K context window · Text · 4 months ago

Readme

This model is part of the Cardano Analytics Platform powered by LLM, a project funded by Project Catalyst Fund 13.

Usage

ollama pull mobr/cap

Run the model

ollama run mobr/cap

Example prompts and responses

Prompt: What is an epoch?
Response:

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT ?def
WHERE {
    ?x rdfs:label "Epoch" .
    ?x rdfs:comment ?def .
}

Prompt: How many transactions in the Cardano network?
Response:

PREFIX blockchain: <http://www.mobr.ai/ontologies/blockchain#>

SELECT (COUNT(?s) AS ?count)
WHERE {
    ?s a blockchain:Transaction .
}

Prompt: What is the average of transactions per block in the last week?
Response:

PREFIX blockchain: <http://www.mobr.ai/ontologies/blockchain#>

SELECT
    (COUNT(DISTINCT ?block) AS ?totalBlocks)
    (COUNT(?transaction) AS ?txCount)
    (?totalTransactions / ?totalBlocks AS ?avgTransactionsPerBlock)
WHERE {
    ?block a blockchain:Block ;
            blockchain:hasTimestamp ?timestamp ;
            blockchain:hasTransaction ?transaction .

    FILTER (?timestamp >= NOW() - "P7D"^^xsd:duration)
}

Key Features

  • Output Only SPARQL: Generates valid SPARQL queries with no explanations, comments, or natural language—strictly query syntax.
  • Cardano Ontology Focus: Leverages the Cardano Ontology (v0.0.1) as context, covering blocks, transactions, staking pools, native tokens (CNTs), governance, epochs, and more.
  • Analytical Queries: Handles metrics (e.g., transaction counts, staking rewards, top holders) and definitions (e.g., “What is a stake pool?”).
  • Time Filters: Supports queries with temporal constraints (e.g., last 24h, weekly averages) using SPARQL’s FILTER and NOW().
  • Complex Aggregations: Computes averages, sums, counts, and percentiles (e.g., top 1% holders, vote counts).

Parameters

  • Temperature: 0.0 (deterministic outputs)
  • Top_p: 1.0
  • Context Length: 30,720 tokens
  • Repeat Penalty: 1.2
  • Stop Token: </s>

License

OpenAI CC-BY-NC-4.0 (non-commercial use). Ontology under Apache 2.0.

For integration with Cardano data pipelines, see the project repo.