Transform your documents into an intelligent knowledge system in 5 minutes
🚀 Research PreviewWe’re currently in research preview! We’re excited to share our system with you, and we would love to hear your feedback.Enterprise Users: Need custom APIs tailored to your specific use case? Submit a request through our form →
Build your first intelligent knowledge system that understands relationships, not just keywords. This guide takes you from zero to a working RAG system using real, tested examples.
# Example: Upload company documentationdocuments = [ "Our product uses advanced machine learning for customer analytics. " "We process millions of transactions daily using distributed systems.", "The analytics dashboard provides real-time insights. Users can track " "customer behavior patterns and predict future trends.", "Security is implemented through OAuth2 and data encryption. All customer " "data is processed in compliance with GDPR regulations."]# Upload to Vedayaresponse = requests.post( f"{API_BASE_URL}/documents/texts", headers=headers, json={ "texts": documents, "file_sources": [f"doc_{i}.txt" for i in range(len(documents))] })if response.status_code == 200: print("✅ Documents uploaded successfully")
2
Wait for Knowledge Graph Generation
The system builds relationships between concepts (takes ~5 seconds):
Copy
print("🔄 Building knowledge graph...")for i in range(30): status = requests.get( f"{API_BASE_URL}/documents/pipeline_status", headers=headers ).json() if not status.get('busy', False): print("✅ Knowledge graph ready!") break time.sleep(2) print(f" Status: {status.get('latest_message', 'Processing...')}")
What’s happening: Vedaya extracts entities, identifies relationships, and builds a knowledge graph for intelligent retrieval.
3
Query Your Knowledge
Ask questions and get relationship-aware answers:
Copy
# Setup OpenAI-compatible clientclient = OpenAI( api_key="sk-dummy", base_url=f"{API_BASE_URL}/v1")# Ask a questionresponse = client.chat.completions.create( model="vedaya-hybrid", messages=[{"role": "user", "content": "How does our security work with analytics?"}], temperature=0.7, max_tokens=500)print("Answer:", response.choices[0].message.content)
Run this complete example in your Python environment:
Copy
# Complete working example - just copy and run!import requestsfrom openai import OpenAIimport time# 1. Upload sample documentsprint("📤 Uploading documents...")requests.post( "https://vedaya-kg.fly.dev/documents/texts", json={ "texts": [ "Vedaya uses knowledge graphs to understand document relationships. " "Unlike traditional search, it maps connections between concepts.", "The system supports multiple retrieval modes: keyword search for facts, " "entity search for specific topics, and graph search for relationships.", "Applications include customer support, research analysis, and " "regulatory compliance documentation." ] })# 2. Wait for processingprint("⚙️ Building knowledge graph...")time.sleep(5)# 3. Query the knowledgeprint("🤔 Asking questions...\n")client = OpenAI(api_key="sk-dummy", base_url="https://vedaya-kg.fly.dev/v1")questions = [ "What makes Vedaya different from traditional search?", "What are the main use cases?", "How do the retrieval modes work?"]for q in questions: response = client.chat.completions.create( model="vedaya-hybrid", messages=[{"role": "user", "content": q}], max_tokens=200 ) print(f"Q: {q}") print(f"A: {response.choices[0].message.content}\n")
Expected Output: You’ll see intelligent answers that understand the relationships between concepts, not just keyword matches.