Archon icon indicating copy to clipboard operation
Archon copied to clipboard

🐛 [Bug]: RAG query returns no results

Open AhmedAburady opened this issue 4 months ago • 10 comments

Archon Version

v0.1.0

Bug Severity

🟠 High - Blocks important features

Bug Description

Whatever I do no results are returned with claude code I've a source https://docs.livekit.io/llms-full.txt all indexed in claude code

 archon - perform_rag_query (MCP)(query: "workflows", source: "docs.livekit.io", match_count: 10)
  ⎿  {                            
       "success": true,
       "results": [],
     … +3 lines (ctrl+r to expand)

● archon - perform_rag_query (MCP)(query: "workflows", source: "file_workflows_md_1755555943", match_count: 10)
  ⎿  {                            
       "success": true,
       "results": [],
     … +3 lines (ctrl+r to expand)

Docker logs:

Archon-Server  | 2025-08-18 22:30:55 | httpx | INFO | HTTP Request: GET https://dinusmhibivlerbyvlwu.supabase.co/rest/v1/archon_crawled_pages?select=id%2Curl%2Cchunk_number%2Ccontent%2Cmetadata%2Csource_id&content=ilike.%25workflow%25&limit=40 "HTTP/2 200 OK"
Archon-Server  | 2025-08-18 22:30:55 | src.server.services.search.rag_service | INFO | RAG query completed - 0 results found
Archon-MCP     | 2025-08-18 22:30:55 | httpx | INFO | HTTP Request: POST http://archon-server:8181/api/rag/query "HTTP/1.1 200 OK"
Archon-MCP     | INFO:     192.168.1.17:51694 - "POST /mcp HTTP/1.1" 200 OK
Archon-MCP     | 2025-08-18 22:30:58 | mcp.server.lowlevel.server | INFO | Processing request of type CallToolRequest
Archon-Server  | 2025-08-18 22:30:58 | search | INFO | Supabase client initialized - project_id=dinusmhibivlerbyvlwu
Archon-Server  | 2025-08-18 22:30:58 | src.server.services.search.reranking_strategy | WARNING | sentence-transformers not available - reranking disabled
Archon-Server  | 2025-08-18 22:30:58 | src.server.services.search.rag_service | INFO | Reranking strategy loaded successfully
Archon-Server  | 2025-08-18 22:30:58 | src.server.services.search.rag_service | INFO | RAG query started: workflows
Archon-Server  | 2025-08-18 22:30:58 | src.server.services.llm_provider_service | INFO | Creating LLM client for provider: openai
Archon-Server  | 2025-08-18 22:30:58 | src.server.services.llm_provider_service | INFO | OpenAI client created successfully
Archon-Server  | 2025-08-18 22:30:59 | httpx | INFO | HTTP Request: POST https://api.openai.com/v1/embeddings "HTTP/1.1 200 OK"
Archon-Server  | 2025-08-18 22:31:00 | httpx | INFO | HTTP Request: POST https://dinusmhibivlerbyvlwu.supabase.co/rest/v1/rpc/match_archon_crawled_pages "HTTP/2 200 OK"
Archon-Server  | 2025-08-18 22:31:00 | httpx | INFO | HTTP Request: GET https://dinusmhibivlerbyvlwu.supabase.co/rest/v1/archon_crawled_pages?select=id%2Curl%2Cchunk_number%2Ccontent%2Cmetadata%2Csource_id&content=ilike.%25workflows%25&limit=40 "HTTP/2 200 OK"
Archon-Server  | 2025-08-18 22:31:00 | httpx | INFO | HTTP Request: GET https://dinusmhibivlerbyvlwu.supabase.co/rest/v1/archon_crawled_pages?select=id%2Curl%2Cchunk_number%2Ccontent%2Cmetadata%2Csource_id&content=ilike.%25workflow%25&limit=40 "HTTP/2 200 OK"
Archon-Server  | 2025-08-18 22:31:00 | src.server.services.search.rag_service | INFO | RAG query completed - 0 results found
Archon-MCP     | 2025-08-18 22:31:00 | httpx | INFO | HTTP Request: POST http://archon-server:8181/api/rag/query "HTTP/1.1 200 OK"

Steps to Reproduce

  1. index "https://docs.livekit.io/llms-full.txt"
  2. ask claude code anything related to this source

Expected Behavior

Returning any result

Actual Behavior

results []

Error Details (if any)


Affected Component

🔍 Knowledge Base / RAG

Browser & OS

zen

Additional Context

No response

Service Status (check all that are working)

  • [x] 🖥️ Frontend UI (http://localhost:3737)
  • [x] ⚙️ Main Server (http://localhost:8181)
  • [x] 🔗 MCP Service (localhost:8051)
  • [x] 🤖 Agents Service (http://localhost:8052)
  • [x] 💾 Supabase Database (connected)

AhmedAburady avatar Aug 18 '25 22:08 AhmedAburady

Hmmm... not able to reproduce this myself. I crawled the same URL and then asked for a Livekit quickstart. It ran a few different queries such as:

{ match_count: 5, query: getting started LiveKit tutorial setup install, source: docs.livekit.io }

And they all returned results.

Could you check your archon_crawled_pages table in Supabase and see if content seems missing there? Also check the code examples.

coleam00 avatar Aug 19 '25 12:08 coleam00

Im having the same problem I am crawling the data in archon & it says its successful, but is not adding the data to the crawled_pages table in Supabase. If I create new projects the data is saving to supabase, just seems to be happening for crawled content.

StueyC85 avatar Aug 20 '25 06:08 StueyC85

It started working for me automagically I dunno how really I installed archon on a vm on proxmox on my network I gave up last time and powered off the vm and today when I tried again, I added the same sources and It worked even without restarting the containers after adding the sources

AhmedAburady avatar Aug 20 '25 07:08 AhmedAburady

I am facing the same problem, This is what my mcp client says { "query": "FastMCP getting started overview installation setup", "source": "gofastmcp.com", "match_count": 10 } Result [ { "type": "text", "text": "{\n "success": true,\n "results": [],\n "reranked": false,\n "error": null\n}" } ]

kshitijg30 avatar Aug 22 '25 13:08 kshitijg30

Yep me too. Never finds anything and is using context7 over knowledge base.

stefandevo avatar Aug 24 '25 21:08 stefandevo

same issue. Last item in logs after crawling (while processing batch) is 2025-08-25 22:02:20 | src.server.services.llm_provider_service | INFO | OpenAI client created successfully

vinny1575 avatar Aug 25 '25 22:08 vinny1575

I have the same problem In logfire I get OPEN_API error despite using gemini. Image

Gemini project shows no traffic on api key

For people with issues, I do recommend setting up logfire and set log level to DEBUG

alf000 avatar Sep 01 '25 12:09 alf000

Also having the same issue - no results returned, though I can see code samples in archon_code_examples table. Interestingly the archon_crawled_pages and archon_document_versions tables are both empty

MoJo1760 avatar Sep 02 '25 22:09 MoJo1760

FWIW - I dumped the knowledge base, and verified that all tables were empty, then recreated them - using the default OpenAI- LLM and embedings models, and things are now returning.

MoJo1760 avatar Sep 02 '25 22:09 MoJo1760

I will take a look at this one, putting in my todo

Wirasm avatar Sep 04 '25 13:09 Wirasm

I'm having the same issue. I just updated to see if it was resolved but it was not. In my case when I look in supabase all the data is there from the crawls. However, the coding agent never returns results. The output is always. { "success": true, "results": [], "reranked": false, "error": null }

frankjoshua avatar Sep 10 '25 16:09 frankjoshua

I have this issue as well. Supabase has records in both tables for crawled page and code examples, but rag searches always return 0 results. I'm using Ollama locally with the qwen2.5-coder:latest for LLM instance and mxbai-embed-large:latest for the embedding instance. Not sure if that matters. I always get back something similar to this without any results returned.

archon/rag_search_knowledge_base { "query": "timeslot OR time slot OR availability OR schedule guided tour endpoint list available times appointments tours", "source_domain": "developers.funnelleasing.com", "match_count": 10 }

dancehands avatar Sep 19 '25 14:09 dancehands

@dancehands / @frankjoshua and everyone else - the problem right now is the coding assistant passes the URL to filter the query instead of the knowledge source ID. I'm fixing this with this PR that I'll merge to main soon!

#705

coleam00 avatar Sep 19 '25 14:09 coleam00

Fix for this in main as of today - will be moving this into the first release too!

coleam00 avatar Sep 20 '25 18:09 coleam00

I pulled in the changes and rebuilt the containers. The issues is still there for me. Although now in the web gui I can see all the documents which I could not before. Every rag search ends in 0 results. Do i need to do any thing else? Like rebuild the knowledge bases.

Image Image

frankjoshua avatar Sep 23 '25 18:09 frankjoshua