NVIDIA Technical Blog

Build an LLM-Powered API Agent for Task Execution

thumbnail

Building an LLM-Powered API Agent for Task Execution

Choosing an LLM

  • Using Mixtral 8x7B, Stable Diffusion XL, and Code Llama 34B for text, image, and code generation.

Building the Agent

  • Tools: Defined individual function calls for each of the API models.
  • Memory Module: Stores information needed for task execution.
  • Planning Module: Generates a plan based on user input or task requirements.
  • Agent Core: Executes the plan by triggering individual tools.

API Tool Classes

  • Helper classes for function calls to the Mixtral 8x7B, Stable Diffusion XL, and Code Llama 34B models.

Execution Plan

  • Generate an image
  • Write a social media post
  • Generate more ideas for a marketing campaign

Text Generation with Mixtral 8x7B

  • "Check out our new product, now with added features! #marketing #innovation"

Next Steps

  • Implement a better planning algorithm to handle more complex tasks and failure instances effectively.

Conclusion

  • By leveraging the power of LLM models and API tools, the marketing organization can efficiently brainstorm and execute ideas for their campaigns, leading to better outcomes and creativity in their strategies.