evilsocket / nerve

Instrument any LLM to do actual stuff.
Other
517 stars 21 forks source link

Issue with rag namespace thread 'main' panicked at src/agent/namespaces/rag/mod.rs: #14

Closed subhashdasyam closed 4 months ago

subhashdasyam commented 4 months ago

Ran the below command

RUST_BACKTRACE=full nerve -G "ollama://llama3:8b@localhost:11434" -E "ollama://all-minilm@localhost:11434" -T auto_rag -P "define a Darmepinter"

I got the following error

[2024-07-05T05:52:26Z DEBUG] tasklet = Tasklet { folder: "/mnt/disk1/nerve_old/examples/auto_rag", name: "auto_rag", system_prompt: "You are an useful assistant that can search for information to provide truthful and concise answers to the user questions.", prompt: None, rag: Some(Configuration { source_path: "./docs", data_path: "./data", chunk_size: Some(1023) }), timeout: None, using: Some(["rag"]), guidance: Some(["You will start by using the search command to find information to answer the user question.", "Your task is complete once the answer to the user question is in memory."]), functions: None }
nerve v0.1.1 🧠 llama3:8b@localhost:11434 > auto_rag

[2024-07-05T05:52:26Z DEBUG] document with id '369bc271482cb8635c16e66153d3e3304f74cc4e69f77ce6304f7307a9a60d46@155' already indexed
[2024-07-05T05:52:26Z DEBUG] document with id '369bc271482cb8635c16e66153d3e3304f74cc4e69f77ce6304f7307a9a60d46@156' already indexed
[2024-07-05T05:52:26Z DEBUG] document with id '369bc271482cb8635c16e66153d3e3304f74cc4e69f77ce6304f7307a9a60d46@157' already indexed
[2024-07-05T05:52:26Z DEBUG] document with id '369bc271482cb8635c16e66153d3e3304f74cc4e69f77ce6304f7307a9a60d46@158' already indexed
[2024-07-05T05:52:26Z DEBUG] document with id 'd5bfd175b6e21463fac6fe449a62a46294433766c96ffd70d665c0ae3e8bad05@0' already indexed
[2024-07-05T05:52:26Z DEBUG] document with id 'cb81cccda3625d0b9e24e8775e96b27d70cdcf90c12f7db5f100b538fdc0b956@0' already indexed
[2024-07-05T05:52:26Z DEBUG] document with id '37e2fb0f093363c4d552b1f4d3aba17052a690dbbef62170ce4ba2787a13a57d@0' already indexed
[2024-07-05T05:52:26Z DEBUG] document with id 'b23571ca25e1f82e58755a542ef1048b6b5814be9cda19a3d3b7b30d7dff2c30@0' already indexed
[2024-07-05T05:52:26Z DEBUG] document with id '5355545119cf6d6017b316f7d37edd7038adafe87cdb05fd8e04a1ec10515fb9@0' already indexed
[2024-07-05T05:52:26Z DEBUG] document with id '01c9edd0617ceeb4d49586bb6d722bbf085f1824f21b317ff891fd8fee0134af@0' already indexed
...
....
...
..

[2024-07-05T05:52:26Z DEBUG] starting new connection: http://localhost:11434/
[2024-07-05T05:52:26Z INFO ] step:1 mem:27.3 MiB
[2024-07-05T05:52:29Z DEBUG] StartDocument(1.0, UTF-8, None)
[2024-07-05T05:52:29Z DEBUG] StartElement(search, {"": "", "xml": "http://www.w3.org/XML/1998/namespace", "xmlns": "http://www.w3.org/2000/xmlns/"})
[2024-07-05T05:52:29Z DEBUG] Characters(what is a Darmepinter?)
[2024-07-05T05:52:29Z DEBUG] EndElement(search)
[2024-07-05T05:52:29Z DEBUG] what is a Darmepinter? (top 1)
[2024-07-05T05:52:29Z DEBUG] starting new connection: http://localhost:11434/
[2024-07-05T05:52:30Z INFO ] rag search for 'what is a Darmepinter?': 1 results in 1.180500744s
thread 'main' panicked at src/agent/namespaces/rag/mod.rs:55:56:
called `Result::unwrap()` on an `Err` value: No such file or directory (os error 2)

Stack backtrace:
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: __libc_start_main
   9: <unknown>
stack backtrace:
   0:     0x5ef42116995f - <unknown>
   1:     0x5ef420ec6a4b - <unknown>
   2:     0x5ef421132bd2 - <unknown>
   3:     0x5ef42116b229 - <unknown>
   4:     0x5ef42116aa4e - <unknown>
   5:     0x5ef42116bc3f - <unknown>
   6:     0x5ef42116b592 - <unknown>
   7:     0x5ef42116b4e9 - <unknown>
   8:     0x5ef42116b4d6 - <unknown>
   9:     0x5ef420d81fc2 - <unknown>
  10:     0x5ef420d82415 - <unknown>
  11:     0x5ef420e392d2 - <unknown>
  12:     0x5ef420e1cf82 - <unknown>
  13:     0x5ef420e4da41 - <unknown>
  14:     0x5ef420e445d3 - <unknown>
  15:     0x5ef420db83c3 - <unknown>
  16:     0x5ef420e4e62f - <unknown>
  17:     0x71af97a29d90 - <unknown>
  18:     0x71af97a29e40 - __libc_start_main
  19:     0x5ef420d9f345 - <unknown>
  20:                0x0 - <unknown>
Aborted (core dumped)
subhashdasyam commented 4 months ago

@evilsocket after debugging session the simple fix https://github.com/evilsocket/mini-rag/pull/1