0
0
LangChainframework~10 mins

Feedback collection and annotation in LangChain - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to select all feedback entries from the feedback table.

LangChain
SELECT [1] FROM feedback;
Drag options to blanks, or click blank then click option'
Auser_id
Bid
Ccomment
D*
Attempts:
3 left
💡 Hint
Common Mistakes
Using a specific column name when all columns are needed.
Leaving the SELECT clause empty.
2fill in blank
medium

Complete the code to insert a new feedback comment into the feedback table.

LangChain
INSERT INTO feedback (user_id, comment) VALUES ([1], 'Great service!');
Drag options to blanks, or click blank then click option'
A'user123'
B123
C'Great service!'
Duser_id
Attempts:
3 left
💡 Hint
Common Mistakes
Using quotes around numeric values.
Inserting the comment text in place of user_id.
3fill in blank
hard

Fix the error in the query to update a feedback comment by id.

LangChain
UPDATE feedback SET comment = 'Updated comment' WHERE id = [1];
Drag options to blanks, or click blank then click option'
A1
B'abc'
C'1'
Dcomment
Attempts:
3 left
💡 Hint
Common Mistakes
Putting numeric id inside quotes.
Using a string value that does not exist.
4fill in blank
hard

Fill both blanks to select feedback comments with rating greater than 3.

LangChain
SELECT comment FROM feedback WHERE rating [1] [2];
Drag options to blanks, or click blank then click option'
A>
B3
C<
Drating
Attempts:
3 left
💡 Hint
Common Mistakes
Using < instead of >.
Comparing rating to a column name instead of a number.
5fill in blank
hard

Fill all three blanks to create a dictionary of user_id to comment for feedback with rating above 4.

LangChain
SELECT [1], [2] FROM feedback WHERE rating [3] 4;
Drag options to blanks, or click blank then click option'
Auser_id
Bcomment
C>
Drating
Attempts:
3 left
💡 Hint
Common Mistakes
Selecting wrong columns.
Using incorrect comparison operator.