YunchaoYang / Blogs

blogs and notes, https://yunchaoyang.github.io/blogs/
0 stars 0 forks source link

Customizing a LLM model #50

Open YunchaoYang opened 8 months ago

YunchaoYang commented 8 months ago
  1. Prompt Engineering a. Zero-shot learning Few-shot learning Select appropriate key wors Do not change weights
  2. Fine-tuning a. Instruction-based b. Domain based Change the weights
  3. RAG (retrieval augmented generation): a. Augments your prompt from multiple data-source b. it can also be a kind of Prompt Engineering

4 Methods of Prompt Engineering

  1. RAG (Retrieval Augmented Generation): Augmenting the knowledge base (db) to enhance responses by combining language models.

    How to guide the model by prompt? There comes the following three ways.

  2. CoT(Chain of Thoughts): Promoting ideas using 'thoughts' in the form of chunks one by one to obtain actual answers. Language models arrive at your desired answers through reasoning and logic. Give a problem, how to break down a problem. Few shot learning

  3. ReAct (Thought, Action, and Observation): Different from the chain of thoughts, this involves both private knowledge base (db) and public language model (llm) data. If information isn't in the knowledge base, it goes back to the public LLM data (trained data) for results. Why? Seems duplicated as RAG

    • Few shot learning.
    • Gather both public and private database.
    • use External source?
    • Compare
  4. DSP (Direct Stimulus Prompting): give LLM a specific question hint to specific details.

LLM challenges:

  1. No source
  2. Out of date
YunchaoYang commented 8 months ago

Build production ready RAG applications

image image image image source: https://www.youtube.com/watch?v=TRjq7t2Ms5I