Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] issue with parsing message history in RAG #2093

Open
8 of 9 tasks
SilverSeed93 opened this issue Sep 27, 2024 · 0 comments
Open
8 of 9 tasks

[BUG] issue with parsing message history in RAG #2093

SilverSeed93 opened this issue Sep 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@SilverSeed93
Copy link

Pre-check

  • I have searched the existing issues and none cover this bug.

Description

I have uploaded a document into PGPT but RAH is having issues with things like JSON in the history. The first time I query the document it works. The second time I query the document, it does not work and I get the following error:
Invalid format specifier ' "Who was George Washington?", "answer": "The first President of the United States of America." ' for object of type 'str'

Source document is formatted Markdown and ingested without error.

This seems to only happen in RAG. If I switch to other tabs and ask it to generate things like JSON and Scripts it works fine. After encountering the error, if I switch from RAG to the other modes it will also still work.

It does break the other way around. If I ask chat to give me an example of JSON format and then go into RAG and query anything it will break and throw the error.

Steps to Reproduce

  1. Import a document
  2. Select RAG
  3. Send prompt: Create question and answer pairs from the document in JSON format using only two keys Question and Answer.
  4. Observe results.
  5. Send prompt: Create question and answer pairs from the document in JSON format using only two keys Question and Answer.
  6. Error is produced.

Another you can try is to upload any decent sized python script.

  1. Import a document
  2. Select RAG
  3. Send prompt: Print the script document into a code block
  4. Observe results.
  5. Send prompt: What does the script do?
  6. Error is produced.

Expected Behavior

parse the history to stop escaping

Actual Behavior

invalid format specifier error thrown

Environment

Win11, 4080 Super

Additional Information

No response

Version

0.6.2

Setup Checklist

  • Confirm that you have followed the installation instructions in the project’s documentation.
  • Check that you are using the latest version of the project.
  • Verify disk space availability for model storage and data processing.
  • Ensure that you have the necessary permissions to run the project.

NVIDIA GPU Setup Checklist

  • Check that the all CUDA dependencies are installed and are compatible with your GPU (refer to CUDA's documentation)
  • Ensure an NVIDIA GPU is installed and recognized by the system (run nvidia-smi to verify).
  • Ensure proper permissions are set for accessing GPU resources.
  • Docker users - Verify that the NVIDIA Container Toolkit is configured correctly (e.g. run sudo docker run --rm --gpus all nvidia/cuda:11.0.3-base-ubuntu20.04 nvidia-smi)
@SilverSeed93 SilverSeed93 added the bug Something isn't working label Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant