Roman Profile picture
May 12 10 tweets 3 min read Read on X
Continuing build cheap, scalable and secure RAG-less architecture for talking with docs.

Start is here

Review of OpenAI fully managed RAG (file_search) here:

The problem with OCR solved: AWS Textract takes real good care of it!


Image
S3-> SFN -> File +Text

That last state in the State Function is where Lambda gets a nicely formatted text. It's either from OCR or in markdown from a text PDFs (extracted by pymupdf4llm package).
The OpenAIs API does not have anything to index and manage documents (I suspect they dump all files into S3 analog on Azure).

It's ok, I want a custom UI anyways, to let users manage docs and a backend to catalog them.
UI is pretty easy to build.

Now the hard part is a searchable catalog of documents. I want something like what MacOS has but not form-fields based search, just tags that makes sense to a user Image
I want a pile of docs from where I can choose tags like "maintenance docs", "boiler"
Or "proposals", "companyName"
Or "email", "airline", "cityName"
And then backend will attach a bunch of docs to file_search and gets ready for chat
Maybe full text search on docs short summaries.
I keep asking myself: maybe RAG-it-all and search document by context instead of metadata?

Because a versatile RAG is notoriously difficult to build. And pretty expensive to run because of server-based tech behind it (all kinds of databases)
So the alternative is a smart backend attaching a bunch different file types to a file_search. Which automatically get indexed and becomes available in chat is _really compelling_

It requires a little bit more upfront cataloging, which needed in any case for a basic security
(who's the docs owner, re-ingesting, updates, etc)

All these "home-made" RAG solutions btw pretend security doesn't exist. BigCloud takes a good care of security, but falls short on flexibility and -lessness.

And the damn cost is too high, even to play with it.
To sump up. With a doc catalog, unproven, expensive solution of building a full scale RAG pipeline became a known, cheap "index and search tons of S3 files" problem.

What's the best architecture there? I see AWS put a lot of Athena-based solutions.
@threadreaderapp unroll

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Roman

Roman Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @naumenko_roman

May 5
After meditating over various libraries, including AWS, GCP, and even Langchain, I think OpenAIs is ahead of the game

500 lines of simple code (80% by ChatGPT) and it finds satisfying $150 savings on insurance

Lets look at why OpenAI is good and where it should improve

#openai

Image
Image
The library and documentation: everything is in one place.
Playground:
Nicely organized tutorials:
API refs includes working examples:

So you try things in the playground; look at tutorials, then code.platform.openai.com/playground/chat
platform.openai.com/docs/overview
platform.openai.com/docs/api-refer…
A huge advantage of OpenAI is a fully Serverless RAG. There are no databases or storage to manage. File uploaded to projects (max 100GB for the whole org, can be adjusted). Then attached to vector stores entities, wait till indexed, and voila - it can do RAG
Read 12 tweets
May 1
I clicked "Introducing Amazon Q Apps (Preview)" and now I can not unsee it

It sends us to a YouTube video where a team struggles with daily tasks but finds relief in Gen AI product. First, they get onboarding plan for John at Example Corp - looks great!

aws.amazon.com/blogs/machine-…
Image
Example Corp was a marketing corporation but it's just a shell; in reality, it's a premier financial services company! Wut?

It partners with AnyCompany to implement AI Boost solution (hey, kids - this is what consulting looks like).
They made an Investment Analyst Assistant. Image
Then, another team member uses AI magic to create a sales script. It's a really powerful one: can be used for AnyProduct.

AnyProduct is a cutting edge generative AI tool, obviously. ExampleCorp wants to buy it. Image
Read 8 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(