Comparing the three options
We examined three options to achieve this result: options 1 and 2 follow the “agentic” approach, using, respectively, pre-built toolkit and single tools combined; option 3, on the other hand, follows a hard-coded approach, letting the developer decide the order of actions to be done.
All three come with pros and cons, so let’s wrap up some final considerations:
- Flexibility vs control: The agentic approach lets the LLM decide which actions to take and in which order. This implies greater flexibility for the end user since there are no constraints in terms of queries that can be done. On the other hand, having no control over the agent’s chain of thoughts could lead to mistakes that would need several tests of prompt engineering. Plus, as LLMs are non-deterministic, it is also hard to recreate mistakes to retrieve the wrong thought process. Under this point of view, the hard-coded approach is safer, since the developer...