๐Ÿ” 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

๐Ÿ“š Examples & Tools

๐Ÿ“Š Results

๐Ÿ› ๏ธ AI-Generated Corrections


๐Ÿš€ 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
  • get_ai_correction: Generate corrected RDF/XML
  • 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 (with HF Inference Endpoint)
  • ๐Ÿ“š Built-in examples and templates
  • ๐Ÿ”„ Auto-validation as you type
  • ๐Ÿ“‹ Copy results with one click

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