Skip to content

abhimanyuHatesToCode/VerbalizedSampling-ChatBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

VerbalizedSampling-ChatBot

Recently experimented with integrating Verbalized Sampling into a multi-mode LLM interface, and moreover added a little twist to it.

So the idea is instead of generating a single response, the system produces multiple candidate outputs, evaluates them, and selects the strongest one, according to their probability. This approach forces the LLM to generate creative, diverse and unpredictable responses.

The result was noticeably higher response diversity (close to 2ร— in practical testing) and reduced repetitive patterns โ€” a small but meaningful step toward mitigating early-stage mode collapse.

Built with FastAPI + Gemini + Streamlit, featuring:

  • Session-based conversational memory
  • Mode-aware behavioral toggles (normal ๐Ÿ˜Š/ reasoning ๐Ÿคฏ/ valentine ๐Ÿ’)
  • Token-aware context trimming

Since it is Valentine's Day, so couldn't stop myself from adding an intriguing Valentine'S Mode, that prompts a distinct shift in the personality.

I also explored behavioral UX signaling:

  • ๐Ÿ’™ Aqua glow โ†’ Reasoning mode (structured multi-candidate sampling)
  • ๐Ÿ’˜ Pink glow โ†’ Valentine mode (stylistic personality shift)
  • ๐Ÿ˜Š Neutral โ†’ Standard conversational mode

The glow isnโ€™t decorative โ€” it visually communicates which behavioral mode generated the response, making experimentation transparent and intuitive.

Key takeaway: improving LLM behavior isnโ€™t always about changing the model โ€” sometimes itโ€™s about changing how we sample and structure its reasoning.

About

A unique approach to tackle model collapse in LLMs using Verbalized Sampling.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages