gptscript-ai / knowledge

Knowledge for GPTScript
https://gptscript-ai.github.io/knowledge/
Apache License 2.0
24 stars 11 forks source link

Not able to get any results for queries from rtf files because of retrieved contents being encoded. #5

Closed sangee2004 closed 4 months ago

sangee2004 commented 5 months ago

Steps to reproduce the problem:

  1. make run from https://github.com/gptscript-ai/knowledge to launch knowledge in server mode.
  2. Copy bin/knowledge to path (/usr/local/bin)
  3. Run the following script to ingest and search a rtf file
    
    # Set KNOW_SERVER_URL=standalone to use the client in standalone mode (i.e. without a server running)

tools: Create Dataset, sys.find, Ingest, Retrieve

Create a new Knowledge Base Dataset with ID ${id} Then, ingest ${filepath} into the dataset. Then, figure out ${query} from the previously ingested files.


name: create dataset description: Create a new Dataset in the Knowledge Base args: id: ID of the Dataset

!knowledge client create-dataset ${id}


name: ingest description: Ingest a file or all files from a directory into a Knowledge Base Dataset args: id: ID of the Dataset args: filepath: Path to the file or directory to be ingested

!knowledge client ingest ${id} ${filepath}


name: retrieve description: Retrieve information from a Knowledge Base Dataset args: id: ID of the Dataset args: query: Query to be executed against the Knowledge Base Dataset

!knowledge client retrieve ${id} ${query}

4. Ingestion is successful. But i am not able to get any responses for the query even though I see `retrieve` tool return some information. This is the response i get - 

The retrieved content appears to be encoded or in a format that is not directly interpretable as text. Therefore, I cannot provide a list of questions relating to the Great Awakening from the ingested file

gptscript % gptscript --disable-cache --debug testknowledge.gpt --id 66662 --filepath /Users/sangeethahariharan/Downloads/mytestdocuments/RTF_Sample.rtf --query "List the questions relating to Great Awekening"
{ "level": "debug", "logger": "/pkg/loader", "msg": "opened testknowledge.gpt", "time": "2024-04-30T11:40:43-07:00" } { "input": "--id 66662 --filepath /Users/sangeethahariharan/Downloads/mytestdocuments/RTF_Sample.rtf --query List the questions relating to Great Awekening", "level": "debug", "logger": "/pkg/monitor", "msg": "Run started", "program": { "name": "testknowledge.gpt", "entryToolId": "testknowledge.gpt:1", "toolSet": { "sys.find": { "name": "sys.find", "description": "Traverse a directory looking for files that match a pattern in the style of the unix find command", "modelName": "gpt-4-turbo-preview", "internalPrompt": null, "arguments": { "properties": { "directory": { "description": "The directory to search in. The current directory \".\" will be used as the default if no argument is passed", "type": "string" }, "pattern": { "description": "The file pattern to look for. The pattern is a traditional unix glob format with matching any character and ? matching a single character", "type": "string" } }, "type": "object" }, "instructions": "#!sys.find", "id": "sys.find", "source": {} }, "testknowledge.gpt:1": { "modelName": "gpt-4-turbo-preview", "internalPrompt": null, "tools": [ "create dataset", "sys.find", "ingest", "retrieve" ], "instructions": "Create a new Knowledge Base Dataset with ID ${id}\nThen, ingest ${filepath} into the dataset.\nThen, figure out ${query} from the previously ingested files.", "id": "testknowledge.gpt:1", "toolMapping": { "create dataset": "testknowledge.gpt:10", "ingest": "testknowledge.gpt:17", "retrieve": "testknowledge.gpt:25", "sys.find": "sys.find" }, "localTools": { "": "testknowledge.gpt:1", "create dataset": "testknowledge.gpt:10", "ingest": "testknowledge.gpt:17", "retrieve": "testknowledge.gpt:25" }, "source": { "location": "testknowledge.gpt", "lineNo": 1 }, "workingDir": "." }, "testknowledge.gpt:10": { "name": "create dataset", "description": "Create a new Dataset in the Knowledge Base", "modelName": "gpt-4-turbo-preview", "internalPrompt": null, "arguments": { "properties": { "id": { "description": "ID of the Dataset", "type": "string" } }, "type": "object" }, "instructions": "#!knowledge client create-dataset ${id}", "id": "testknowledge.gpt:10", "localTools": { "": "testknowledge.gpt:1", "create dataset": "testknowledge.gpt:10", "ingest": "testknowledge.gpt:17", "retrieve": "testknowledge.gpt:25" }, "source": { "location": "testknowledge.gpt", "lineNo": 10 }, "workingDir": "." }, "testknowledge.gpt:17": { "name": "ingest", "description": "Ingest a file or all files from a directory into a Knowledge Base Dataset", "modelName": "gpt-4-turbo-preview", "internalPrompt": null, "arguments": { "properties": { "filepath": { "description": "Path to the file or directory to be ingested", "type": "string" }, "id": { "description": "ID of the Dataset", "type": "string" } }, "type": "object" }, "instructions": "#!knowledge client ingest ${id} ${filepath}", "id": "testknowledge.gpt:17", "localTools": { "": "testknowledge.gpt:1", "create dataset": "testknowledge.gpt:10", "ingest": "testknowledge.gpt:17", "retrieve": "testknowledge.gpt:25" }, "source": { "location": "testknowledge.gpt", "lineNo": 17 }, "workingDir": "." }, "testknowledge.gpt:25": { "name": "retrieve", "description": "Retrieve information from a Knowledge Base Dataset", "modelName": "gpt-4-turbo-preview", "internalPrompt": null, "arguments": { "properties": { "id": { "description": "ID of the Dataset", "type": "string" }, "query": { "description": "Query to be executed against the Knowledge Base Dataset", "type": "string" } }, "type": "object" }, "instructions": "#!knowledge client retrieve ${id} ${query}", "id": "testknowledge.gpt:25", "localTools": { "": "testknowledge.gpt:1", "create dataset": "testknowledge.gpt:10", "ingest": "testknowledge.gpt:17", "retrieve": "testknowledge.gpt:25" }, "source": { "location": "testknowledge.gpt", "lineNo": 25 }, "workingDir": "." } } }, "runID": "1", "time": "2024-04-30T11:40:43-07:00" } { "id": "1", "input": "--id 66662 --filepath /Users/sangeethahariharan/Downloads/mytestdocuments/RTF_Sample.rtf --query List the questions relating to Great Awekening", "level": "info", "logger": "/pkg/monitor", "msg": "started [main]", "parentID": "", "time": "2024-04-30T11:40:43-07:00", "toolID": "testknowledge.gpt:1" } { "id": "1", "level": "info", "logger": "/pkg/monitor", "msg": "sent [main]", "parentID": "", "time": "2024-04-30T11:40:44-07:00", "toolID": "testknowledge.gpt:1" } { "completionID": "1", "id": "1", "level": "debug", "logger": "/pkg/monitor", "msg": "debug", "parentID": "", "request": { "model": "gpt-4-turbo-preview", "messages": [ { "role": "system", "content": "\nYou are task oriented system.\nYou receive input from a user, process the input from the given instructions, and then output the result.\nYour objective is to provide consistent and correct results.\nYou do not need to explain the steps taken, only provide the result to the given instructions.\nYou are referred to as a tool.\nYou don't move to the next step until you have a result.\n\nCreate a new Knowledge Base Dataset with ID ${id}\nThen, ingest ${filepath} into the dataset.\nThen, figure out ${query} from the previously ingested files." }, { "role": "user", "content": "--id 66662 --filepath /Users/sangeethahariharan/Downloads/mytestdocuments/RTF_Sample.rtf --query List the questions relating to Great Awekening" } ], "temperature": 0, "tools": [ { "type": "function", "function": { "name": "createDataset", "description": "Create a new Dataset in the Knowledge Base", "parameters": { "properties": { "id": { "description": "ID of the Dataset", "type": "string" } }, "type": "object" } } }, { "type": "function", "function": { "name": "find", "description": "Traverse a directory looking for files that match a pattern in the style of the unix find command", "parameters": { "properties": { "directory": { "description": "The directory to search in. The current directory \".\" will be used as the default if no argument is passed", "type": "string" }, "pattern": { "description": "The file pattern to look for. The pattern is a traditional unix glob format with matching any character and ? matching a single character", "type": "string" } }, "type": "object" } } }, { "type": "function", "function": { "name": "ingest", "description": "Ingest a file or all files from a directory into a Knowledge Base Dataset", "parameters": { "properties": { "filepath": { "description": "Path to the file or directory to be ingested", "type": "string" }, "id": { "description": "ID of the Dataset", "type": "string" } }, "type": "object" } } }, { "type": "function", "function": { "name": "retrieve", "description": "Retrieve information from a Knowledge Base Dataset", "parameters": { "properties": { "id": { "description": "ID of the Dataset", "type": "string" }, "query": { "description": "Query to be executed against the Knowledge Base Dataset", "type": "string" } }, "type": "object" } } } ] }, "time": "2024-04-30T11:40:44-07:00", "toolID": "testknowledge.gpt:1" } content [1] content | Waiting for model response... content [1] content | tool call createDataset -> {"id":"66662"} { "cached": false, "completionID": "1", "id": "1", "level": "debug", "logger": "/pkg/monitor", "msg": "debug", "parentID": "", "response": { "role": "assistant", "content": [ { "toolCall": { "index": 0, "id": "call_lcuL69BvTIFSFOpFc6iWnCEf", "function": { "name": "createDataset", "arguments": "{\"id\":\"66662\"}" } } } ] }, "time": "2024-04-30T11:40:45-07:00", "toolID": "testknowledge.gpt:1" } { "id": "call_lcuL69BvTIFSFOpFc6iWnCEf", "input": "{\"id\":\"66662\"}", "level": "info", "logger": "/pkg/monitor", "msg": "started [create dataset(2)]", "parentID": "1", "time": "2024-04-30T11:40:45-07:00", "toolID": "testknowledge.gpt:10" } { "level": "debug", "logger": "/pkg/env", "msg": "Looking for knowledge in /Users/sangeethahariharan/.rd/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/usr/local/go/bin:/Users/sangeethahariharan/.cargo/bin", "time": "2024-04-30T11:40:45-07:00" } { "level": "debug", "logger": "/pkg/env", "msg": "Found /usr/local/bin/knowledge for knowledge in /Users/sangeethahariharan/.rd/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/usr/local/go/bin:/Users/sangeethahariharan/.cargo/bin", "time": "2024-04-30T11:40:45-07:00" } { "id": "call_lcuL69BvTIFSFOpFc6iWnCEf", "level": "info", "logger": "/pkg/monitor", "msg": "sent [create dataset(2)]", "parentID": "1", "time": "2024-04-30T11:40:45-07:00", "toolID": "testknowledge.gpt:10" } { "completionID": "1", "id": "call_lcuL69BvTIFSFOpFc6iWnCEf", "level": "debug", "logger": "/pkg/monitor", "msg": "debug", "parentID": "1", "request": { "command": [ "/usr/local/bin/knowledge", "client", "create-dataset", "66662" ], "input": "{\"id\":\"66662\"}" }, "time": "2024-04-30T11:40:45-07:00", "toolID": "testknowledge.gpt:10" } { "cached": false, "completionID": "1", "id": "call_lcuL69BvTIFSFOpFc6iWnCEf", "level": "debug", "logger": "/pkg/monitor", "msg": "debug", "parentID": "1", "response": { "err": null, "output": "Created dataset \"66662\"\n" }, "time": "2024-04-30T11:40:45-07:00", "toolID": "testknowledge.gpt:10" } { "id": "call_lcuL69BvTIFSFOpFc6iWnCEf", "level": "info", "logger": "/pkg/monitor", "msg": "ended [create dataset(2)]", "output": "Created dataset \"66662\"\n", "parentID": "1", "time": "2024-04-30T11:40:45-07:00", "toolID": "testknowledge.gpt:10" } { "id": "1", "level": "info", "logger": "/pkg/monitor", "msg": "continue [main]", "parentID": "", "time": "2024-04-30T11:40:45-07:00", "toolID": "testknowledge.gpt:1", "toolResults": 1 } { "id": "1", "level": "info", "logger": "/pkg/monitor", "msg": "sent [main]", "parentID": "", "time": "2024-04-30T11:40:45-07:00", "toolID": "testknowledge.gpt:1" } { "completionID": "2", "id": "1", "level": "debug", "logger": "/pkg/monitor", "msg": "debug", "parentID": "", "request": { "model": "gpt-4-turbo-preview", "messages": [ { "role": "system", "content": "\nYou are task oriented system.\nYou receive input from a user, process the input from the given instructions, and then output the result.\nYour objective is to provide consistent and correct results.\nYou do not need to explain the steps taken, only provide the result to the given instructions.\nYou are referred to as a tool.\nYou don't move to the next step until you have a result.\n\nCreate a new Knowledge Base Dataset with ID ${id}\nThen, ingest ${filepath} into the dataset.\nThen, figure out ${query} from the previously ingested files." }, { "role": "user", "content": "--id 66662 --filepath /Users/sangeethahariharan/Downloads/mytestdocuments/RTF_Sample.rtf --query List the questions relating to Great Awekening" }, { "role": "assistant", "content": "", "tool_calls": [ { "id": "call_lcuL69BvTIFSFOpFc6iWnCEf", "type": "function", "function": { "name": "createDataset", "arguments": "{\"id\":\"66662\"}" } } ] }, { "role": "tool", "content": "Created dataset \"66662\"\n", "name": "createDataset", "tool_call_id": "call_lcuL69BvTIFSFOpFc6iWnCEf" } ], "temperature": 0, "tools": [ { "type": "function", "function": { "name": "createDataset", "description": "Create a new Dataset in the Knowledge Base", "parameters": { "properties": { "id": { "description": "ID of the Dataset", "type": "string" } }, "type": "object" } } }, { "type": "function", "function": { "name": "find", "description": "Traverse a directory looking for files that match a pattern in the style of the unix find command", "parameters": { "properties": { "directory": { "description": "The directory to search in. The current directory \".\" will be used as the default if no argument is passed", "type": "string" }, "pattern": { "description": "The file pattern to look for. The pattern is a traditional unix glob format with matching any character and ? matching a single character", "type": "string" } }, "type": "object" } } }, { "type": "function", "function": { "name": "ingest", "description": "Ingest a file or all files from a directory into a Knowledge Base Dataset", "parameters": { "properties": { "filepath": { "description": "Path to the file or directory to be ingested", "type": "string" }, "id": { "description": "ID of the Dataset", "type": "string" } }, "type": "object" } } }, { "type": "function", "function": { "name": "retrieve", "description": "Retrieve information from a Knowledge Base Dataset", "parameters": { "properties": { "id": { "description": "ID of the Dataset", "type": "string" }, "query": { "description": "Query to be executed against the Knowledge Base Dataset", "type": "string" } }, "type": "object" } } } ] }, "time": "2024-04-30T11:40:45-07:00", "toolID": "testknowledge.gpt:1" } content [1] content | Waiting for model response... content [1] content | tool call ingest -> {"filepath":"/Users/sangeethahariharan/Downloads/mytestdocuments/RTF_Sample.rtf","id":"66662"} { "cached": false, "completionID": "2", "id": "1", "level": "debug", "logger": "/pkg/monitor", "msg": "debug", "parentID": "", "response": { "role": "assistant", "content": [ { "toolCall": { "index": 0, "id": "call_USBlf1rNTDxvWFJRepxy1y4Q", "function": { "name": "ingest", "arguments": "{\"filepath\":\"/Users/sangeethahariharan/Downloads/mytestdocuments/RTF_Sample.rtf\",\"id\":\"66662\"}" } } } ] }, "time": "2024-04-30T11:40:47-07:00", "toolID": "testknowledge.gpt:1" } { "id": "call_USBlf1rNTDxvWFJRepxy1y4Q", "input": "{\"filepath\":\"/Users/sangeethahariharan/Downloads/mytestdocuments/RTF_Sample.rtf\",\"id\":\"66662\"}", "level": "info", "logger": "/pkg/monitor", "msg": "started [ingest(3)]", "parentID": "1", "time": "2024-04-30T11:40:47-07:00", "toolID": "testknowledge.gpt:17" } { "level": "debug", "logger": "/pkg/env", "msg": "Looking for knowledge in /Users/sangeethahariharan/.rd/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/usr/local/go/bin:/Users/sangeethahariharan/.cargo/bin", "time": "2024-04-30T11:40:47-07:00" } { "level": "debug", "logger": "/pkg/env", "msg": "Found /usr/local/bin/knowledge for knowledge in /Users/sangeethahariharan/.rd/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/usr/local/go/bin:/Users/sangeethahariharan/.cargo/bin", "time": "2024-04-30T11:40:47-07:00" } { "id": "call_USBlf1rNTDxvWFJRepxy1y4Q", "level": "info", "logger": "/pkg/monitor", "msg": "sent [ingest(3)]", "parentID": "1", "time": "2024-04-30T11:40:47-07:00", "toolID": "testknowledge.gpt:17" } { "completionID": "2", "id": "call_USBlf1rNTDxvWFJRepxy1y4Q", "level": "debug", "logger": "/pkg/monitor", "msg": "debug", "parentID": "1", "request": { "command": [ "/usr/local/bin/knowledge", "client", "ingest", "66662", "/Users/sangeethahariharan/Downloads/mytestdocuments/RTF_Sample.rtf" ], "input": "{\"filepath\":\"/Users/sangeethahariharan/Downloads/mytestdocuments/RTF_Sample.rtf\",\"id\":\"66662\"}" }, "time": "2024-04-30T11:40:47-07:00", "toolID": "testknowledge.gpt:17" } { "cached": false, "completionID": "2", "id": "call_USBlf1rNTDxvWFJRepxy1y4Q", "level": "debug", "logger": "/pkg/monitor", "msg": "debug", "parentID": "1", "response": { "err": null, "output": "Ingested \"/Users/sangeethahariharan/Downloads/mytestdocuments/RTF_Sample.rtf\" into dataset \"66662\"\n" }, "time": "2024-04-30T11:40:53-07:00", "toolID": "testknowledge.gpt:17" } { "id": "call_USBlf1rNTDxvWFJRepxy1y4Q", "level": "info", "logger": "/pkg/monitor", "msg": "ended [ingest(3)]", "output": "Ingested \"/Users/sangeethahariharan/Downloads/mytestdocuments/RTF_Sample.rtf\" into dataset \"66662\"\n", "parentID": "1", "time": "2024-04-30T11:40:53-07:00", "toolID": "testknowledge.gpt:17" } { "id": "1", "level": "info", "logger": "/pkg/monitor", "msg": "continue [main]", "parentID": "", "time": "2024-04-30T11:40:53-07:00", "toolID": "testknowledge.gpt:1", "toolResults": 1 } { "id": "1", "level": "info", "logger": "/pkg/monitor", "msg": "sent [main]", "parentID": "", "time": "2024-04-30T11:40:54-07:00", "toolID": "testknowledge.gpt:1" } { "completionID": "3", "id": "1", "level": "debug", "logger": "/pkg/monitor", "msg": "debug", "parentID": "", "request": { "model": "gpt-4-turbo-preview", "messages": [ { "role": "system", "content": "\nYou are task oriented system.\nYou receive input from a user, process the input from the given instructions, and then output the result.\nYour objective is to provide consistent and correct results.\nYou do not need to explain the steps taken, only provide the result to the given instructions.\nYou are referred to as a tool.\nYou don't move to the next step until you have a result.\n\nCreate a new Knowledge Base Dataset with ID ${id}\nThen, ingest ${filepath} into the dataset.\nThen, figure out ${query} from the previously ingested files." }, { "role": "user", "content": "--id 66662 --filepath /Users/sangeethahariharan/Downloads/mytestdocuments/RTF_Sample.rtf --query List the questions relating to Great Awekening" }, { "role": "assistant", "content": "", "tool_calls": [ { "id": "call_lcuL69BvTIFSFOpFc6iWnCEf", "type": "function", "function": { "name": "createDataset", "arguments": "{\"id\":\"66662\"}" } } ] }, { "role": "tool", "content": "Created dataset \"66662\"\n", "name": "createDataset", "tool_call_id": "call_lcuL69BvTIFSFOpFc6iWnCEf" }, { "role": "assistant", "content": "", "tool_calls": [ { "id": "call_USBlf1rNTDxvWFJRepxy1y4Q", "type": "function", "function": { "name": "ingest", "arguments": "{\"filepath\":\"/Users/sangeethahariharan/Downloads/mytestdocuments/RTF_Sample.rtf\",\"id\":\"66662\"}" } } ] }, { "role": "tool", "content": "Ingested \"/Users/sangeethahariharan/Downloads/mytestdocuments/RTF_Sample.rtf\" into dataset \"66662\"\n", "name": "ingest", "tool_call_id": "call_USBlf1rNTDxvWFJRepxy1y4Q" } ], "temperature": 0, "tools": [ { "type": "function", "function": { "name": "createDataset", "description": "Create a new Dataset in the Knowledge Base", "parameters": { "properties": { "id": { "description": "ID of the Dataset", "type": "string" } }, "type": "object" } } }, { "type": "function", "function": { "name": "find", "description": "Traverse a directory looking for files that match a pattern in the style of the unix find command", "parameters": { "properties": { "directory": { "description": "The directory to search in. The current directory \".\" will be used as the default if no argument is passed", "type": "string" }, "pattern": { "description": "The file pattern to look for. The pattern is a traditional unix glob format with matching any character and ? matching a single character", "type": "string" } }, "type": "object" } } }, { "type": "function", "function": { "name": "ingest", "description": "Ingest a file or all files from a directory into a Knowledge Base Dataset", "parameters": { "properties": { "filepath": { "description": "Path to the file or directory to be ingested", "type": "string" }, "id": { "description": "ID of the Dataset", "type": "string" } }, "type": "object" } } }, { "type": "function", "function": { "name": "retrieve", "description": "Retrieve information from a Knowledge Base Dataset", "parameters": { "properties": { "id": { "description": "ID of the Dataset", "type": "string" }, "query": { "description": "Query to be executed against the Knowledge Base Dataset", "type": "string" } }, "type": "object" } } } ] }, "time": "2024-04-30T11:40:54-07:00", "toolID": "testknowledge.gpt:1" } content [1] content | Waiting for model response... content [1] content | tool call retrieve -> {"id":"66662","query":"List the questions relating to Great Awakening"} { "cached": false, "completionID": "3", "id": "1", "level": "debug", "logger": "/pkg/monitor", "msg": "debug", "parentID": "", "response": { "role": "assistant", "content": [ { "toolCall": { "index": 0, "id": "call_p4VyNqCfBK3pGQM32kji6waj", "function": { "name": "retrieve", "arguments": "{\"id\":\"66662\",\"query\":\"List the questions relating to Great Awakening\"}" } } } ] }, "time": "2024-04-30T11:40:55-07:00", "toolID": "testknowledge.gpt:1" } { "id": "call_p4VyNqCfBK3pGQM32kji6waj", "input": "{\"id\":\"66662\",\"query\":\"List the questions relating to Great Awakening\"}", "level": "info", "logger": "/pkg/monitor", "msg": "started [retrieve(4)]", "parentID": "1", "time": "2024-04-30T11:40:55-07:00", "toolID": "testknowledge.gpt:25" } { "level": "debug", "logger": "/pkg/env", "msg": "Looking for knowledge in /Users/sangeethahariharan/.rd/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/usr/local/go/bin:/Users/sangeethahariharan/.cargo/bin", "time": "2024-04-30T11:40:55-07:00" } { "level": "debug", "logger": "/pkg/env", "msg": "Found /usr/local/bin/knowledge for knowledge in /Users/sangeethahariharan/.rd/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/usr/local/go/bin:/Users/sangeethahariharan/.cargo/bin", "time": "2024-04-30T11:40:55-07:00" } { "id": "call_p4VyNqCfBK3pGQM32kji6waj", "level": "info", "logger": "/pkg/monitor", "msg": "sent [retrieve(4)]", "parentID": "1", "time": "2024-04-30T11:40:55-07:00", "toolID": "testknowledge.gpt:25" } { "completionID": "3", "id": "call_p4VyNqCfBK3pGQM32kji6waj", "level": "debug", "logger": "/pkg/monitor", "msg": "debug", "parentID": "1", "request": { "command": [ "/usr/local/bin/knowledge", "client", "retrieve", "66662", "List the questions relating to Great Awakening" ], "input": "{\"id\":\"66662\",\"query\":\"List the questions relating to Great Awakening\"}" }, "time": "2024-04-30T11:40:55-07:00", "toolID": "testknowledge.gpt:25" } { "cached": false, "completionID": "3", "id": "call_p4VyNqCfBK3pGQM32kji6waj", "level": "debug", "logger": "/pkg/monitor", "msg": "debug", "parentID": "1", "response": { "err": null, "output": "Retrieved the following 5 sources for the query \"List the questions relating to Great Awakening\" from dataset \"66662\": [{\"content\":\"AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDBmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmYwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDANCjAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAxMDUwMDAwMDAwMDAwMDB9fQ==\",\"metadata\":{\"filename\":\"RTF_Sample.rtf\"},\"similarity_score\":0.7463454},{\"content\":\"Q0OTE3MjQ4IFxoaWNoXGFmMVxkYmNoXGFmMzE1MDVcbG9jaFxmMSApIH17XHJ0bGNoXGZjczEgXGFmMVxhZnMyMCBcbHRyY2hcZmNzMCBcZjFcZnMyMFxpbnNyc2lkMTUxNTA0NjggXGhpY2hcYWYxXGRiY2hcYWYzMTUwNVxsb2NoXGYxIEZyYW5rbGlufXtccnRsY2hcZmNzMSBcYWYxXGFmczIwIFxsdHJjaFxmY3MwIFxmMVxmczIwXGluc3JzaWQ0OTE3MjQ4XGNoYXJyc2lkNDkxNzI0OCANClxoaWNoXGFmMVxkYmNoXGFmMzE1MDVcbG9jaFxmMSAgUm9vc2V2ZWx0IHdhcyB0aGUgfXtccnRsY2hcZmNzMSBcYWYxXGFmczIwIFxsdHJjaFxmY3MwIFxmMVxmczIwXGluc3JzaWQ0OTE3MjQ4IFxoaWNoXGFmMVxkYmNoXGFmMzE1MDVcbG9jaFxmMSBbYV19e1xydGxjaFxmY3MxIFxhZjFcYWZzMjAgXGx0cmNoXGZjczAgXGYxXGZzMjBcaW5zcnNpZDQ5MTcyNDhcY2hhcnJzaWQ0OTE3MjQ4IFxoaWNoXGFmMVxkYmNoXGFmMzE1MDVcbG9jaFxmMSANCiBkdXJpbmcgfXtccnRsY2hcZmNzMSBcYWYxXGFmczIwIFxsdHJjaFxmY3MwIFxmMVxmczIw\",\"metadata\":{\"filename\":\"RTF_Sample.rtf\"},\"similarity_score\":0.74259335},{\"content\":\"yc2lkNDkxNzI0OCBcaGljaFxhZjFcZGJjaFxhZjMxNTA1XGxvY2hcZjEgVHlwZTogRiB9e1xydGxjaFxmY3MxIFxhZjFcYWZzMjAgXGx0cmNoXGZjczAgDQpcZjFcZnMyMFxpbnNyc2lkNDkxNzI0OCBcaGljaFxhZjFcZGJjaFxhZjMxNTA1XGxvY2hcZjEgVGl0bGU6IH17XHJ0bGNoXGZjczEgXGFmMVxhZnMyMCBcbHRyY2hcZmNzMCBcZjFcZnMyMFxpbnNyc2lkNDkxNzI0OFxjaGFycnNpZDQ5MTcyNDggXGhpY2hcYWYxXGRiY2hcYWYzMTUwNVxsb2NoXGYxIFdXSUkgUHJlc2lkZW50IENhdGVnb3J5OiBBbWVyaWNhbiBIaXN0b3J5L1dXSUkgDQpccGFyIH1ccGFyZCBcbHRycGFyXHMxNlxxbCBcbGkwXHJpMFx3aWRjdGxwYXJcd3JhcGRlZmF1bHRcYXNwYWxwaGFcYXNwbnVtXGZhYXV0b1xhZGp1c3RyaWdodFxyaW4wXGxpbjBcaXRhcDBccGFyYXJzaWQxNTE1MDQ2OCB7XHJ0bGNoXGZjczEgXGFmMVxhZnMyMCBcbHRyY2hcZmNzMCBcZjFcZnMyMFxpbnNyc2lkNDkxNzI0OCBcaGljaFxhZjFcZGJjaFxhZjMx\",\"metadata\":{\"filename\":\"RTF_Sample.rtf\"},\"similarity_score\":0.740502},{\"content\":\"5OTA5NCANClxwYXI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CBcbHRyY2hcZmNzMCBcZmktMzYwXGxpMjg4MFxsaW4yODgwIH17XGxpc3RsZXZlbFxsZXZlbG5mYzRcbGV2ZWxuZmNuNFxsZXZlbGpjMFxsZXZlbGpjbjBcbGV2ZWxmb2xsb3cwXGxldmVsc3RhcnRhdDFcbHZsdGVudGF0aXZlXGxldmVsc3BhY2UwXGxldmVsaW5kZW50MHtcbGV2ZWx0ZXh0DQpcbGV2ZWx0ZW1wbGF0ZWlkNjc2OTg3MTNcJzAyXCcwNC47fXtcbGV2ZWxudW1iZXJzXCcwMTt9XHJ0bGNoXGZjczEgXGFmMCBcbHRyY2hcZmNzMCBcZmktMzYwXGxpMzYwMFxsaW4zNjAwIH17XGxpc3RsZXZlbFxsZXZlbG5mYzJcbGV2ZWxuZmNuMlxsZXZlbGpjMlxsZXZlbGpj\",\"metadata\":{\"filename\":\"RTF_Sample.rtf\"},\"similarity_score\":0.73963165}]\n" }, "time": "2024-04-30T11:40:55-07:00", "toolID": "testknowledge.gpt:25" } { "id": "call_p4VyNqCfBK3pGQM32kji6waj", "level": "info", "logger": "/pkg/monitor", "msg": "ended [retrieve(4)]", "output": "Retrieved the following 5 sources for the query \"List the questions relating to Great Awakening\" from dataset \"66662\": [{\"content\":\"AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDBmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmYwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDANCjAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAxMDUwMDAwMDAwMDAwMDB9fQ==\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0bGNoXGZjczEgXGFmMVxhZnMyMCBcbHRyY2hcZmNzMCBcZjFcZnMyMFxpbnNyc2lkNTk3NDM2NCBcaGljaFxhZjFcZGJjaFxhZjMxNTA1XGxvY2hcZjEgKmMufXtccnRsY2hcZmNzMSBcYWYxXGFmczIwIFxsdHJjaFxmY3MwIFxmMVxmc\",\"metadata\":{\"filename\":\"RTF_Sample.rtf\"},\"similarity_score\":0.7404962},{\"content\":\"MTgwXGxpMjE2MFxsaW4yMTYwIH17XGxpc3RsZXZlbFxsZXZlbG5mYzBcbGV2ZWxuZmNuMFxsZXZlbGpjMFxsZXZlbGpjbjBcbGV2ZWxmb2xsb3cwXGxldmVsc3RhcnRhdDFcbHZsdGVudGF0aXZlXGxldmVsc3BhY2UwXGxldmVsaW5kZW50MA0Ke1xsZXZlbHRleHRcbGV2ZWx0ZW1wbGF0ZWlkNjc2OTg3MDNcJzAyXCcwMy47fXtcbGV2ZWxudW1iZXJzXCcwMTt9XHJ0bGNoXGZjczEgXGFmMCBcbHRyY2hcZmNzMCBcZmktMzYwXGxpMjg4MFxsaW4yODgwIH17XGxpc3RsZXZlbFxsZXZlbG5mYzRcbGV2ZWxuZmNuNFxsZXZlbGpjMFxsZXZlbGpjbjBcbGV2ZWxmb2xsb3cwXGxldmVsc3RhcnRhdDFcbHZsdGVudGF0aXZlXGxldmVsc3BhY2UwXGxldmVsaW5kZW50MHtcbGV2ZWx0ZXh0DQpcbGV2ZWx0ZW1wbGF0ZWlkNjc2OTg3MTNcJzAyXCcwNC47fXtcbGV2ZWxudW1iZXJzXCcwMTt9XHJ0bGNoXGZjczEgXGFmMCBcbHRyY2hcZmNzMCBcZmktMzYwXGxpMzYwMFxsaW4zNjAwIH17XGxpc3RsZXZlbFxsZXZlbG5mYzJcbGV2ZWxuZmNuMlxsZXZlbGpjMlxsZXZlbGpj\",\"metadata\":{\"filename\":\"RTF_Sample.rtf\"},\"similarity_score\":0.73963165}]\n", "parentID": "1", "time": "2024-04-30T11:40:55-07:00", "toolID": "testknowledge.gpt:25" } { "id": "1", "level": "info", "logger": "/pkg/monitor", "msg": "continue [main]", "parentID": "", "time": "2024-04-30T11:40:55-07:00", "toolID": "testknowledge.gpt:1", "toolResults": 1 } { "id": "1", "level": "info", "logger": "/pkg/monitor", "msg": "sent [main]", "parentID": "", "time": "2024-04-30T11:40:55-07:00", "toolID": "testknowledge.gpt:1" } { "completionID": "4", "id": "1", "level": "debug", "logger": "/pkg/monitor", "msg": "debug", "parentID": "", "request": { "model": "gpt-4-turbo-preview", "messages": [ { "role": "system", "content": "\nYou are task oriented system.\nYou receive input from a user, process the input from the given instructions, and then output the result.\nYour objective is to provide consistent and correct results.\nYou do not need to explain the steps taken, only provide the result to the given instructions.\nYou are referred to as a tool.\nYou don't move to the next step until you have a result.\n\nCreate a new Knowledge Base Dataset with ID ${id}\nThen, ingest ${filepath} into the dataset.\nThen, figure out ${query} from the previously ingested files." }, { "role": "user", "content": "--id 66662 --filepath /Users/sangeethahariharan/Downloads/mytestdocuments/RTF_Sample.rtf --query List the questions relating to Great Awekening" }, { "role": "assistant", "content": "", "tool_calls": [ { "id": "call_lcuL69BvTIFSFOpFc6iWnCEf", "type": "function", "function": { "name": "createDataset", "arguments": "{\"id\":\"66662\"}" } } ] }, { "role": "tool", "content": "Created dataset \"66662\"\n", "name": "createDataset", "tool_call_id": "call_lcuL69BvTIFSFOpFc6iWnCEf" }, { "role": "assistant", "content": "", "tool_calls": [ { "id": "call_USBlf1rNTDxvWFJRepxy1y4Q", "type": "function", "function": { "name": "ingest", "arguments": "{\"filepath\":\"/Users/sangeethahariharan/Downloads/mytestdocuments/RTF_Sample.rtf\",\"id\":\"66662\"}" } } ] }, { "role": "tool", "content": "Ingested \"/Users/sangeethahariharan/Downloads/mytestdocuments/RTF_Sample.rtf\" into dataset \"66662\"\n", "name": "ingest", "tool_call_id": "call_USBlf1rNTDxvWFJRepxy1y4Q" }, { "role": "assistant", "content": "", "tool_calls": [ { "id": "call_p4VyNqCfBK3pGQM32kji6waj", "type": "function", "function": { "name": "retrieve", "arguments": "{\"id\":\"66662\",\"query\":\"List the questions relating to Great Awakening\"}" } } ] }, { "role": "tool", "content": "Retrieved the following 5 sources for the query \"List the questions relating to Great Awakening\" from dataset \"66662\": [{\"content\":\"AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDBmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmYwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDANCjAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAxMDUwMDAwMDAwMDAwMDB9fQ==\",\"metadata\":{\"filename\":\"RTF_Sample.rtf\"},\"similarity_score\":0.7463454},{\"content\":\"Q0OTE3MjQ4IFxoaWNoXGFmMVxkYmNoXGFmMzE1MDVcbG9jaFxmMSApIH17XHJ0bGNoXGZjczEgXGFmMVxhZnMyMCBcbHRyY2hcZmNzMCBcZjFcZnMyMFxpbnNyc2lkMTUxNTA0NjggXGhpY2hcYWYxXGRiY2hcYWYzMTUwNVxsb2NoXGYxIEZyYW5rbGlufXtccnRsY2hcZmNzMSBcYWYxXGFmczIwIFxsdHJjaFxmY3MwIFxmMVxmczIwXGluc3JzaWQ0OTE3MjQ4XGNoYXJyc2lkNDkxNzI0OCANClxoaWNoXGFmMVxkYmNoXGFmMzE1MDVcbG9jaFxmMSAgUm9vc2V2ZWx0IHdhcyB0aGUgfXtccnRsY2hcZmNzMSBcYWYxXGFmczIwIFxsdHJjaFxmY3MwIFxmMVxmczIwXGluc3JzaWQ0OTE3MjQ4IFxoaWNoXGFm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J0bGNoXGZjczEgXGFmMCBcbHRyY2hcZmNzMCBcZmktMzYwXGxpMjg4MFxsaW4yODgwIH17XGxpc3RsZXZlbFxsZXZlbG5mYzRcbGV2ZWxuZmNuNFxsZXZlbGpjMFxsZXZlbGpjbjBcbGV2ZWxmb2xsb3cwXGxldmVsc3RhcnRhdDFcbHZsdGVudGF0aXZlXGxldmVsc3BhY2UwXGxldmVsaW5kZW50MHtcbGV2ZWx0ZXh0DQpcbGV2ZWx0ZW1wbGF0ZWlkNjc2OTg3MTNcJzAyXCcwNC47fXtcbGV2ZWxudW1iZXJzXCcwMTt9XHJ0bGNoXGZjczEgXGFmMCBcbHRyY2hcZmNzMCBcZmktMzYwXGxpMzYwMFxsaW4zNjAwIH17XGxpc3RsZXZlbFxsZXZlbG5mYzJcbGV2ZWxuZmNuMlxsZXZlbGpjMlxsZXZlbGpj\",\"metadata\":{\"filename\":\"RTF_Sample.rtf\"},\"similarity_score\":0.73963165}]\n", "name": "retrieve", "tool_call_id": "call_p4VyNqCfBK3pGQM32kji6waj" } ], "temperature": 0, "tools": [ { "type": "function", "function": { "name": "createDataset", "description": "Create a new Dataset in the Knowledge Base", "parameters": { "properties": { "id": { "description": "ID of the Dataset", "type": "string" } }, "type": "object" } } }, { "type": "function", "function": { "name": "find", "description": "Traverse a directory looking for files that match a pattern in the style of the unix find command", "parameters": { "properties": { "directory": { "description": "The directory to search in. The current directory \".\" will be used as the default if no argument is passed", "type": "string" }, "pattern": { "description": "The file pattern to look for. The pattern is a traditional unix glob format with * matching any character and ? matching a single character", "type": "string" } }, "type": "object" } } }, { "type": "function", "function": { "name": "ingest", "description": "Ingest a file or all files from a directory into a Knowledge Base Dataset", "parameters": { "properties": { "filepath": { "description": "Path to the file or directory to be ingested", "type": "string" }, "id": { "description": "ID of the Dataset", "type": "string" } }, "type": "object" } } }, { "type": "function", "function": { "name": "retrieve", "description": "Retrieve information from a Knowledge Base Dataset", "parameters": { "properties": { "id": { "description": "ID of the Dataset", "type": "string" }, "query": { "description": "Query to be executed against the Knowledge Base Dataset", "type": "string" } }, "type": "object" } } } ] }, "time": "2024-04-30T11:40:55-07:00", "toolID": "testknowledge.gpt:1" } content [1] content | Waiting for model response... content [1] content | The retrieved content appears to be encoded or in a format that is not directly interpretable as text. Therefore, I cannot provide a list of questions relating to the Great Awakening from the ingested file. { "cached": false, "completionID": "4", "id": "1", "level": "debug", "logger": "/pkg/monitor", "msg": "debug", "parentID": "", "response": { "role": "assistant", "content": [ { "text": "The retrieved content appears to be encoded or in a format that is not directly interpretable as text. Therefore, I cannot provide a list of questions relating to the Great Awakening from the ingested file." } ] }, "time": "2024-04-30T11:40:59-07:00", "toolID": "testknowledge.gpt:1" } { "id": "1", "level": "info", "logger": "/pkg/monitor", "msg": "ended [main]", "output": "The retrieved content appears to be encoded or in a format that is not directly interpretable as text. Therefore, I cannot provide a list of questions relating to the Great Awakening from the ingested file.", "parentID": "", "time": "2024-04-30T11:40:59-07:00", "toolID": "testknowledge.gpt:1" } { "err": null, "level": "debug", "logger": "/pkg/monitor", "msg": "Run stopped", "output": "The retrieved content appears to be encoded or in a format that is not directly interpretable as text. Therefore, I cannot provide a list of questions relating to the Great Awakening from the ingested file.", "runID": "1", "time": "2024-04-30T11:40:59-07:00" }

INPUT:

--id 66662 --filepath /Users/sangeethahariharan/Downloads/mytestdocuments/RTF_Sample.rtf --query List the questions relating to Great Awekening

OUTPUT:

The retrieved content appears to be encoded or in a format that is not directly interpretable as text. Therefore, I cannot provide a list of questions relating to the Great Awakening from the ingested file.


**Knowledge logs** dont indicate any errors:

2024/04/30 11:41:56 INFO Creating dataset id=66663 [GIN] 2024/04/30 - 11:41:56 | 200 | 1.072917ms | ::1 | POST "/v1/datasets/create" 2024/04/30 11:42:03 INFO Ingesting content into dataset dataset=66663 2024/04/30 11:42:03 DEBUG Received ingest request content_size=148600 metadata="&{Name:RTF_Sample.rtf AbsolutePath:/Users/sangeethahariharan/Downloads/mytestdocuments/RTF_Sample.rtf Size:83584 ModifiedAt:2024-03-07 17:04:30 -0800 PST}" 2024/04/30 11:42:03 INFO IngestOpts opts="{Filename:0x140003763b0 FileMetadata:0x14001f15980 IsDuplicateFuncName: IsDuplicateFunc:}" 2024/04/30 11:42:03 DEBUG Loading data type=.rtf filename=RTF_Sample.rtf 2024/04/30 11:42:03 DEBUG Ingesting documents count=199 2024/04/30 11:42:09 INFO Ingested document filename=RTF_Sample.rtf count=199 absolute_path=/Users/sangeethahariharan/Downloads/mytestdocuments/RTF_Sample.rtf [GIN] 2024/04/30 - 11:42:09 | 200 | 6.347162458s | ::1 | POST "/v1/datasets/66663/ingest" 2024/04/30 11:42:11 INFO Retrieving content from dataset dataset=66663 2024/04/30 11:42:11 DEBUG Retrieving content from dataset dataset=66663 query="{Prompt:List the questions relating to India TopK:0x14009afd658}" 2024/04/30 11:42:11 DEBUG Retrieved documents num_documents=5 [GIN] 2024/04/30 - 11:42:11 | 200 | 175.818292ms | ::1 | POST "/v1/datasets/66663/retrieve"

sangee2004 commented 5 months ago

Renamed rft file to .txt to upload - RTF_Sample.txt

iwilltry42 commented 4 months ago

There was a bug where in client-server mode, content was double encoded - that's fixed now :+1:

sangee2004 commented 4 months ago

Able to retrieve information from rtf files successfully when testing with latest version of knowledge.