How to increase browse-back buffer in terminals?

I’ve searched for help on this topic, and asked several ai’s for help, and nothing has worked. The problem is this:

I often have lengthy chats with locally running AI’s through (terminal app) ollama, on Philosophy or Physics, or when I need help with a programming problem. But when I go to save the transcript, I find much of it already lost. This is absurd. I have 64 gigs of RAM; linux should be able to notice that and relax its memory paranoias about buffer sizes. I want my read back buffers to be 100 times bigger than they are, but no amount of system tweaking ever seems to do the trick. I’m on Ubuntu, Noble.
A corollary or alternative question might be, can I put my ollama calls in an alias or batch file that automatically saves my chats to date/time-stamped files?

Its 11 months since you asked your question; but I hope this helps.

I Googled ‘ubuntu bash scrollback buffer’ and discovered Mastering Linux Screen Scroll Up: A Comprehensive Guide — linuxvox.com

This contained the info you seek. My own PoP!_OS distro didn’t exactly match this article’s info, but I did find the desired scrollback buffer setting (default of 1000 lines). You didn’t say which distro you are using, but I would hope you terminal program also has settings in which you will find a scrollback buffer setting too.