Let's say currently there is a test build of a project which calls OpenAI. It then calls a library that indirectly calls OpenAI, which will decide on a series of documents (html, pdfs) to download from the internet and then does some logicking process based on the corpus to derive an analysis (let's assume it is a .doc or .md, doesn't really matter here).
The current process is inefficient because
- it downloads the 'corpora' into memory, so the entire process just gets killed off if there is an error
- the library being used is a bit opaque and there is a need to inject some observability tooling (traces, metrics, logs) to see where it is 'choking'
Need some suggestions on how you would proceed in this scenario, or any advice
...