liveBook · Manning

Code LLaMA

As explained in Starting Data Analytics with Generative AI and Python

Code Llama is a large language model specialized for generating and understanding programming code.

Code LLaMA is a programming-focused language model that can propose Python workflows from plain-language requests. A practical use is filtering Portuguese customer reviews with positive keywords. Its deliberately simple output can be useful when you want control, but generated code still requires inspection, testing, and validation against the original reviews. section 5.5.6

Filtering Portuguese reviews

Prompt: “I have a dataframe with a review_comment_message column containing Portuguese customer reviews. Propose Python code to extract positive reviews using keyword search.” The resulting workflow loads review data, defines Portuguese keywords such as “ótimo,” “excelente,” and “recomendo,” applies a case-insensitive check, and saves matching rows to positive_reviews.csv. Review the keyword list and inspect sample matches, because punctuation, spelling, grammar, special characters, bias, and misleading matches can affect accuracy. section 5.5.6

How Starting Data Analytics with Generative AI and Python covers it

How deep it goes
Demonstrates prompting and a basic implementation, but stops short of robust language processing and sentiment-intensity analysis.
Examples
Uses Portuguese e-commerce reviews, positive keyword lists, a review dataframe, and a CSV export.
What it assumes
Assumes a pandas dataframe with review_comment_message and teaches the basic keyword-filtering structure from that starting point.
What you can do after
Apply Code LLaMA through a Python and pandas workflow, then inspect and validate the extracted reviews.
How it connects
Connects Python, pandas, keyword search, sentiment analysis, data quality, bias, and validation.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Starting Data Analytics with Generative AI and Python. The section links point to the parts of the book it draws on.