Reading SEC filings using LLMs
I have been working on getting ChatGPT to answer questions that equity research analysts, investors would like to get from SEC filings. The application uses a combination of hybrid text search and LLMs for completion and does not rely much on embedding based distance searches.<p>A core assumption underlying this is that LLMs are already pretty good and will continue to get better at reading texts. If provided with the right thing to read, they will do very well on &#x27;reading comprehension&#x27;.<p>Open ended writing is more susceptible to errors, especially in questions related to finance. For e.g google&#x27;s revenues are just as likely to be 280.2 billion vs 279 billion in a probabilistic model that guesses the next part of the sentence -  Google&#x27;s revenues for FY 2022 are ....<p>So this leaves us with the main problem to solve; Serving the right texts to the LLM aka text search.<p>Once the right text is served, we can generate any pretty much anything in the text, Income statements, ceo comments, accounts payable on the fly, For e.g try - `can you get me Nvidia and AMD&#x27;s income statement from March 2020 ?` as in here. <a href="https:&#x2F;&#x2F;imgur.com&#x2F;gallery&#x2F;H8Vfd5X" rel="nofollow noreferrer">https:&#x2F;&#x2F;imgur.com&#x2F;gallery&#x2F;H8Vfd5X</a>
A few more examples, Apple&#x27;s sales in China, Google&#x27;s revenue by quarter: <a href="https:&#x2F;&#x2F;imgur.com&#x2F;a&#x2F;oCCay3o" rel="nofollow noreferrer">https:&#x2F;&#x2F;imgur.com&#x2F;a&#x2F;oCCay3o</a><p>Currently, the application supports ~8k companies that are registered with the SEC. Pdfs are still work in progress, so tesla etc don&#x27;t work as well.<p>The stack is Nextjs on Supabase. So Postgres&#x27;s inbuilt text search does a lot of heavy lifting.<p>If one thinks of the bigger picture, we can extend&#x2F;improve this to pdfs and the entire universe of stocks and more. a.k.a a big component of what CapitalIQ, Factset, Bloomberg and Reuters do can now be generated on the fly accurately for a fraction of the cost.<p>Generating graphs with gross margin increasing etc are just one step further and stuff like EV&#x2F;Ebitda, yet another step further,  as one can call a stock pricing api for each date of the report.<p>I would guess a number of LLM applications follow a similar process, ask a question --&gt; LLM converts to query --&gt; datalakes&#x2F;bases --&gt; searching and serving texts --&gt; answer.
Goes without saying, I would appreciate any feedback, especially from those who are building stuff that looks architecturally similar :) !