Skip to main content
Glama

RAG Document Server

by jaimeferj
test_doc_search.py864 B
"""Test documentation search.""" import asyncio from rag_server.rag_system import RAGSystem def main(): rag = RAGSystem() # Test documentation query result = rag.query('what are automation conditions in Dagster?', top_k=5) print('Query Results:') print('Keys in result:', list(result.keys())) print(f'Confidence: {result.get("confidence", "N/A")}') print(f'Sources: {len(result.get("sources", []))}') print() if result['sources']: print('Top sources:') for i, src in enumerate(result['sources'][:5], 1): print(f'{i}. {src.get("filename", "unknown")}') print(f' Tags: {src.get("tags", [])}') print(f' Preview: {src.get("text", "")[:150]}...') print() print('Answer preview:') print(result['answer'][:500]) if __name__ == '__main__': main()

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jaimeferj/mcp-rag-docs'

If you have feedback or need assistance with the MCP directory API, please join our Discord server