๐Ÿ” RDF Validation Server with AI

Validate RDF/XML against SHACL schemas with AI-powered suggestions and corrections

Status: ๐Ÿ”‘ AI features enabled

Debug Info
        Debug Info:
        - OPENAI_AVAILABLE: True
        - HF_INFERENCE_AVAILABLE: True
        - HF_API_KEY set: Yes
        - HF_API_KEY length: 37
        - HF_ENDPOINT_URL: https://evxgv66ksxjlfrts.us-east-1.aws.endpoints.huggingface.cloud/v1/
        - HF_MODEL: lmstudio-community/Llama-3.3-70B-Instruct-GGUF
        

๐Ÿ“ Input

Validation Template

Select the SHACL template to validate against

Enable AI-powered suggestions and corrections

Include warnings in AI corrections (violations only by default)

Try multiple correction attempts until validation passes or attempts run out

1 3

Display step-by-step process (turn on when you want transparency)

๐Ÿ“š Examples & Tools

๐Ÿ“Š Results

๐Ÿ› ๏ธ AI-Generated Corrections


๏ฟฝ Documentation & Resources:

๐Ÿ“– MCP4BibFrame Documentation - Complete BibFrame ontology reference with examples

This validator integrates with the MCP4BibFrame Documentation API to provide authoritative BibFrame ontology information during AI-powered corrections.

๐Ÿš€ Quick Start:

  1. Paste your RDF/XML in the input box above
  2. Click "Validate RDF" to check for errors
  3. Review AI suggestions for plain-language fixes (enhanced with BibFrame documentation)
  4. Copy the corrected RDF from the output

๏ฟฝ๐Ÿš€ Deployment Instructions for Hugging Face Spaces:

  1. Create a new Space on Hugging Face
  2. Set up your Hugging Face Inference Endpoint and get the endpoint URL
  3. Set your tokens in Space settings (use Secrets for security):
    • Go to Settings โ†’ Repository secrets
    • Add: HF_API_KEY = your_huggingface_api_key_here
    • Endpoint is now hardcoded to your specific Inference Endpoint
  4. Upload these files to your Space repository
  5. Install requirements: The Space will auto-install from requirements.txt

๐Ÿ”ง MCP Server Mode:

This app functions as both a web interface AND an MCP server for Claude Desktop and other MCP clients.

Available MCP Tools:

  • validate_rdf_tool: Validate RDF/XML against SHACL shapes
  • get_ai_suggestions: Get AI-powered fix suggestions (with BibFrame docs)
  • get_ai_correction: Generate corrected RDF/XML (with BibFrame docs)
  • get_rdf_examples: Retrieve example RDF snippets
  • validate_rdf_interface: Complete validation with AI suggestions and corrections (primary tool)

MCP Configuration (Streamable HTTP): Add this configuration to your MCP client (Claude Desktop, etc.):

{
  "mcpServers": {
    "rdf-validator": {
      "url": "https://jimfhahn-mcp4rdf.hf.space/gradio_api/mcp/"
    }
  }
}

Alternative SSE Configuration:

{
  "mcpServers": {
    "rdf-validator": {
      "url": "https://jimfhahn-mcp4rdf.hf.space/gradio_api/mcp/sse"
    }
  }
}

๐Ÿ’ก Features:

  • โœ… Real-time RDF/XML validation against SHACL schemas
  • ๐Ÿค– AI-powered error suggestions and corrections (enhanced with BibFrame ontology docs)
  • ๐Ÿ“š Built-in examples and templates
  • ๐Ÿ”— Integrated with MCP4BibFrame Documentation API
  • ๐Ÿ“‹ Copy results with one click

BibFrame Documentation Integration: AI corrections now use authoritative BibFrame ontology information from the MCP4BibFrame Documentation API to ensure accuracy and compliance with official specifications.

๐Ÿ”— Related Resources:

Note: AI features require a valid Hugging Face API key (HF_API_KEY) set as a Secret. Manual suggestions are provided as fallback.