Tag Archives: ai

Customizing LLMs: Retrieval Augmented Generation

Retrieval Augmented Generation or RAG is a technique that enables generative artificial intelligence (Gen AI) models to retrieve and incorporate new information. It modifies interactions with a large language model (LLM) so that the model responds to user queries with reference to a specified set of documents, using this information to supplement information from its pre-existing training data. This allows LLMs to use domain-specific and/or updated information (Wikipedia) . It is another fundamental LLM customization technique that is relatively simple, low-cost, and still requires no model modifications.

Read More

Customizing LLMs: Prompt Engineering

Prompt Engineering or Prompting is the process of structuring or crafting an instruction in order to produce the best possible output from a generative artificial intelligence (AI) model (Wikipedia). It is the most fundamental LLM customization technique and is simple, low-cost, and requires no model modifications.

In this post, we will explore some common prompting techniques such as:

  1. Zero-Shot Prompting – Asking the LLM to answer without prior examples.
  2. Few-Shot Prompting – Providing a few examples in the prompt to improve accuracy.
  3. Chain-of-Thought (CoT) Prompting – Encouraging step-by-step reasoning to enhance complex problem-solving.
  4. Meta Prompting – Guide the reasoning process by introducing structure, constraints, or multi-step instructions.
  5. Self-Consistency Prompting – Generate multiple solutions and select the most frequently appearing answer.
  6. Tree of Thought (ToT) Prompting – Exploring multiple reasoning paths before selecting an answer.
  7. Prompt Chaining – Not exactly a prompting technique, it is using the output of the previous prompt as input to the next prompt.
Read More

LLM Customization

A large language model or LLM is a type of machine learning model designed for natural language processing or NLP. These models have an extremely high number of parameters (trillions as of this writing) and are trained on vast amounts of human-generated and human-consumed data. Due to their extensive training on this data, LLMs develop predictive capabilities in syntax, semantics, and knowledge within human language. This enables them to generate coherent and contextually relevant responses, giving the impression of intelligence.

Read More

Transformer²: Self-Adaptive LLMs

LLMs are typically developed through a process of training on vast amounts of data, the corpus. This costs a lot of time and money. ChatGPT-3, for example, cost $10M. This cost going down but it’s remains expensive. You can avoid this cost for specific use cases by “fine-tuning” a model with specific data or you can augment their prompts with reference data as in Retrieval Augmented Generation or RAG. The next stage in LLM development are models that update/evolve through time. This is what’s discussed in Sakana AI’s paper Transformer²: Self-Adaptive LLMs.