AI-Assisted Software Engineering: LLM Fundamentals, RAG, and Verification

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/52

encourage image

There's no tags or description

Looks like no tags are added yet.

53 Terms

1
New cards

What is the primary purpose of using generative AI?

To validate the output, read and understand generated work, and provide clear instructions.

2
New cards

What are the ethical considerations when using AI?

Ethical, privacy, and security implications.

3
New cards

What is the relationship between AI and Machine Learning?

AI is the broad field, while Machine Learning is a subset where algorithms improve through experience.

<p>AI is the broad field, while Machine Learning is a subset where algorithms improve through experience.</p>
4
New cards

What does LLM stand for?

Large Language Model.

5
New cards

What is Software 1.0?

Traditional programming where developers write explicit code.

<p>Traditional programming where developers write explicit code.</p>
6
New cards

What characterizes Software 2.0?

The use of neural networks where objectives are specified and training data is provided.

7
New cards

What is the concept of Software 3.0?

Natural language programming where users instruct LLMs using natural language prompts.

8
New cards

What is the role of context windows in LLMs?

They act like working memory for the model.

9
New cards

What is RAG in the context of LLMs?

RAG supplies a file system of external knowledge.

10
New cards

What is the significance of debugging generated code?

To effectively understand and correct errors in AI-generated outputs.

11
New cards

What does the recursive software loop refer to?

The interaction between Software 1.0, 2.0, and 3.0 where each generation extends the capabilities of the previous ones.

12
New cards

How do neural networks learn?

By adjusting weights based on the error from predictions.

13
New cards

What is gradient descent?

A method for finding the minimum error by iteratively adjusting based on local slope information.

<p>A method for finding the minimum error by iteratively adjusting based on local slope information.</p>
14
New cards

What is next-token prediction in LLMs?

A process where the model predicts the next token based on a sequence of previous tokens.

15
New cards

What is the transformer architecture?

A model introduced in the 'Attention Is All You Need' paper that evaluates relationships among tokens.

16
New cards

What is the crucial distinction regarding LLMs?

LLMs simulate understanding but do not possess it.

17
New cards

How do tokens function in LLMs?

Models process tokens, which can represent words, parts of words, punctuation, or whitespace.

18
New cards

What is the average character count per token in English text?

One token averages roughly four characters.

19
New cards

What does the analogy of LLMs being like someone who has read about swimming illustrate?

It shows that LLMs can describe concepts without truly understanding them.

20
New cards

What is the significance of prompts in LLM programming?

Prompts describe the desired behavior for the model to interpret and execute.

21
New cards

What are the implications of tokenization in code?

Code tokenizes differently from prose, affecting how models process and interpret input.

22
New cards

What is the importance of setting realistic expectations for LLM behavior?

To ensure users understand the limitations and capabilities of the model.

23
New cards

What does 'Software eating software' refer to?

The concept that newer software generations can create or configure earlier generations.

24
New cards

What is the role of training in neural networks?

Training adjusts connection weights until the network performs tasks accurately.

25
New cards

What does the term 'semantic search' refer to in LLMs?

The ability to understand and retrieve information based on meaning rather than keywords.

26
New cards

What is the function of embeddings in LLMs?

To represent words or phrases in a continuous vector space for better semantic understanding.

27
New cards

What does 'hallucination' mean in the context of LLMs?

When a model generates outputs that are plausible but factually incorrect.

28
New cards

What does top-p sampling do?

Limits choices to a probability mass.

29
New cards

What is the purpose of top-k sampling?

Limits choices to the most likely candidates.

30
New cards

How do frequency and presence penalties affect language models?

They influence repetition and topic variety.

31
New cards

What is meant by 'Weights = Compressed Knowledge'?

It refers to the idea that a neural network's weights contain fuzzy, incomplete knowledge derived from extensive training data.

32
New cards

What is the significance of embeddings in language models?

They represent words or tokens as vectors, allowing the model to understand semantic relationships.

33
New cards

What does the phrase 'Garbage in → Garbage out' imply in the context of language models?

It means that biases in training data lead to biases in model outputs.

34
New cards

What does 'Distance = similarity' mean in the context of embeddings?

Close vectors in embedding space indicate similar meanings, while far vectors indicate different meanings.

35
New cards

What is the purpose of the Embedding Projector tool?

To visualize and explore relationships between words and concepts using pre-trained embeddings.

36
New cards

How can code be embedded in language models?

Similar functions are represented by similar vectors, enabling semantic code search.

37
New cards

What is the process for storing embeddings in vector databases?

1. Embed documents or code, 2. Store vectors, 3. Embed queries, 4. Find nearest neighbors.

38
New cards

What does RAG stand for in the context of language models?

Retrieval-Augmented Generation.

39
New cards

What is the memory illusion in language models?

LLMs have no memory between API calls; each request is independent.

40
New cards

How do chatbots simulate memory?

By prepending previous messages to every new request.

41
New cards

What is a context window?

The amount of information a model can remember, often limited to a certain number of tokens.

42
New cards

What is a key limitation of RAG?

Retrieval quality depends on the quality of embeddings and may retrieve irrelevant chunks.

43
New cards

What are hallucinations in the context of language models?

Confident but incorrect outputs generated by the model, often due to training biases.

44
New cards

What verification strategies can be employed to catch AI lies?

1. Run the code and tests, 2. Check official documentation, 3. Be skeptical of unfamiliar APIs.

45
New cards

How should one treat AI-generated code?

Like a lazy genius; always check its work for accuracy.

46
New cards

What is the implication of long contexts in language models?

Information in the middle may be forgotten, so important context should be placed at the start or end.

47
New cards

What is the relationship between LLMs and training data?

LLMs only know their training data and do not have current information about specific codebases.

48
New cards

What is the importance of context engineering?

It improves the outputs of language models by providing relevant information.

49
New cards

What should you consider when trusting AI-generated code?

Code complexity, familiarity with the domain, and consequences of potential bugs.

50
New cards

What does 'Understanding = geometric relationships' mean in LLMs?

It means that the model navigates high-dimensional space based on relationships between vectors.

51
New cards

What happens when LLMs encounter underrepresented data?

They exhibit worse performance due to lack of training examples.

52
New cards

What is the role of attention in language models?

Attention operates on vectors to determine the importance of different tokens in a context.

53
New cards

What is the significance of using specific file references in RAG?

It helps keep context focused and relevant for better retrieval quality.