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

Display thinking tokens #21

Open
san7988 opened this issue Jan 31, 2025 · 2 comments
Open

Display thinking tokens #21

san7988 opened this issue Jan 31, 2025 · 2 comments

Comments

@san7988
Copy link

san7988 commented Jan 31, 2025

I'm trying to figure out how to persist the thinking tokens on UI. They do get displayed but the moment generation is complete, only the final output is visible. The thinking tokens are gone.

Can someone please point out what can be done?

Thanks

@rlancemartin
Copy link
Collaborator

Yes, good point!

I remove them here when saving the summary to state.

This is because they appear to confuse the model on the reflection step. In the reflect step, we ask the model to produce a follow-up question but I found the think tokens spam the context window and can confuse the model in this step, since we just want to model to reflect on the produced summary.

You can play around with adding them back. Feel free to put up a PR if you find a solution you like!

@sanjeev-kumar-4
Copy link

Missed that in the code. Yes, they would just spam the context for further generation. I'll try and see if I can just store and display it somehow in the UI, trim it while preparing context for further generation.

Also, for the queries I was trying, the final summary was not very good. probably prompt tuning would be needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants