3 ms·
To put together a basic question/answer demo that didn't quite fit their templates, I had to hunt a bunch of doc pages and and cobble together snippets from mul
by d4rkp4ttern 4y ago
To put together a basic question/answer demo that didn't quite fit their templates, I had to hunt a bunch of doc pages and and cobble together snippets from multiple notebooks. Sure, the final result was under 30 lines of code, BUT:
It uses fns/classes like `load_qa_with_sources_chain` and `ConversationalRetrievalChain`, and to know what these do under the hood, I tried stepping into the debugger, and it was a nightmare of call after call up and down the object hierarchy. They have verbose mode so you can see what prompts are being generated, but there is more to it than just the prompts. I had to spend several hours piecing together a simple flat recipe based on this object hierarchy hunting.
It very much feels like what happened with PyTorch Lightning -- sure, you can accomplish things with "just a few lines of code", but now everything is in one giant function, and you have to understand all the settings. If you ever want to do something different, good luck digging into their code -- I've been there, for example trying to implement a version of k-fold cross-validation: again, an object-hierarchy mess.
- eloijoub 4y agoThanks for you message, totally agree with you it's a nightmare. I'm currently trying to understand what`load_qa_with_sources_chain` and `ConversationalRetrievalChain` do under the hood.… Would you have something to share to help me ?
- d4rkp4ttern 4y agoI can suggest stepping through the debugger (in say PyCharm) and you will see what it does