Getting Answers from a Big PDF with RubyLLM - Max Chernyak
23-May-2025 43
Some API vendors give you an API doc in a giant custom-edited PDF file. In my case it’s >1200 pages, with a “helpful” table of contents that itself spans about 20 pages.
Well, I dislike reading giant PDF docs, love writing Ruby, and there’s an awesome RubyLLM gem, and Gemini supports PDF parsing, so maybe I can just throw together a quick CLI tool that can answer questions for me? Alas, Gemini is limited to 1000 pages. Either way it would probably be too wasteful to send the entire doc every time. RubyLLM supports tools, so I decided to try that out.
Getting Answers from a Big PDF with RubyLLM - Max Chernyak #ruby #rubydeveloper #rubyonrails #Getting #Answers #RubyLLM #Chernyak https://rubyonrails.ba/link/getting-answers-from-a-big-pdf-with-rubyllm-max-chernyak