enricoros / big-AGI

Generative AI suite powered by state-of-the-art models and providing advanced AI/AGI functions. It features AI personas, AGI functions, multi-model chats, text-to-image, voice, response streaming, code highlighting and execution, PDF import, presets for developers, much more. Deploy on-prem or in the cloud.
https://big-agi.com
MIT License
4.84k stars 1.1k forks source link

[BUG] Compressing a compressed conversation generates error #456

Open james777b opened 4 months ago

james777b commented 4 months ago

Description

After an ongoing conversation (more than 4K tokens) with multiple models (llama2, codellama, tinyllama) via ollama, I compressed the conversation to the 'detailed' level. It worked fine afaict. Then I compressed again to 'brief.'

The text it rendered was: """ \begin{code} df = pd.read_csv('C:/Users/Administrator/Desktop/test.csv', skiprows=range(0, 4500)) \end{code} \end{code} """

That is four lines verbatim, even the duplicated end.

When I accepted that change to replace text, it did in fact replace the conversation text with message.

Also, that directory... isn't mine. I am running the app via a similar location; it's was in my username. And, I'm on Windows.

Device and browser

Windows 10; Firefox.

Screenshots and more

No response

Willingness to Contribute

enricoros commented 3 months ago

Thanks for the report @james777b. The compression prompts are probably not "strong" enough to work well with smaller models, and should be revised.

It's impressive how the model hallucinated that code and also the username. Definitely it's not in the prompting, I wonder how they made it up.