Please enable JavaScript.
Coggle requires JavaScript to display documents.
LLM & Text Generation - Coggle Diagram
LLM & Text Generation
-
-
-
-
-
-
LLMs
transformer architecture
encoder/decoder
encoder takes the input, and create a representation of it and decoder uses this decoder to print te output
-
-
-
Generation params
Temperature
controls the degree of randomness in token selection. Higher temperatures result in a higher number of candidate tokens
Top-P
defines the probability threshold that, once cumulatively exceeded, tokens stop being selected as candidates
Prompting
Techniques :star:
-
Chain of Thought (CoT)
-
-
uses a simple 'greedy decoding' strategy, which means it typically produces a single reasoning path based on the highest probability tokens at each step
For CoT prompting, set the temperature to 0.
ReAct
-
enabling LLMs to solve complex tasks using natural language reasoning combined with external tools (search, code interpreter etc.)
Tree of Thoughts (ToT)
it allows LLMs to explore multiple different reasoning paths simultaneously, rather than just following a single linear chain of thought.
-
-
-
System, contextual and role prompting
-
-
-
-
Self-consistency
Providing the same CoT prompt multiple times, often with a higher temperature setting to encourage the generation of diverse reasoning paths
-
use software or an API to send the exact same prompt to the language model several times,
-
-
Code prompting :<3:
for generating code, configuration and scripts
-
-
-
multimodal prompting
a technique where you use multiple input formats to guide
a LLM, f.ex. text, images, audio
-
-
LLM output configuration
Sampling :recycle:
Temperature
low temperature
temperature = 0
-
model picks the most probable words, without randomness
-
-
-
-
-
nucleus sampling
-
Top
-
higher p, more possible words
-
order: topK, topP, temperature
topK=1 or topP=1 overrides the temperature, always forces single best guess
starting points
temperature .2, topP .95 topK 30
-
-
Training :silhouette:
-
-
- reinforcement learning from human feedback
-
-
-
-
Evaluation
Pointwise evaluation
ewaluacja punktowa
pojęcie matematyczne, które oznacza ocenianie funkcji w konkretnych punktach jej dziedziny — „punkt po punkcie”.
-
-
-
General :checkered_flag:
LLMs struggle with math tasks and often give wrong answers even in simple tasks as multilying because they are trained on large volumes of text and math may require a different approach.
-
-
-
Embeddings
-
-
RAG
-
-
-
prompt expansion
the model retrieves relevant information from the database and augments the original prompt with it.
vector databases
-
-
-
use cases
-
similarity search for diferent types of data (test, videos etc)
semantic search (based on the meaning, context)
-
-
types
text embeddings
-
-
-
tokenization
text to tokens, each token get unique ID
-
-
-
-
-
-
-
-
LLM limitations
they only "know" the information that they were trained on,
-
-
-