10 Software frameworks
This chapter covers
- Building applications with LangChain
- Solving complex tasks with agents
- Querying data with LlamaIndex
Up to now, we’ve mostly been using OpenAI’s Python library to interact with language models. This library offers basic functionality for sending prompts and retrieving answers from GPT and other OpenAI models (as well as options for tuning and fine-tuning). The libraries from other providers, such as Anthropic and Cohere, offer similar functionality. As long as your data-analysis tasks are simple, this is probably all you need. However, what if your data analysis requires a complex multistep pipeline, possibly integrating many different data formats?
At that point, you may want to switch to a more powerful software framework. Several higher-level frameworks for building complex applications on top of language models are currently emerging. In this chapter, we’ll discuss two of the most popular contenders: LangChain and LlamaIndex. The former is a general framework for building applications using large language models. What’s more, it comes with various useful built-in components that implement popular use cases for language models. LlamaIndex, on the other hand, specifically supports use cases where language models need to interact with large data sets.