Amazon Review Opinion Search Engine
Santiago Segovia
June 2025 - August 2025
Technologies — Python
View source on GitHubAbstract
Developed a Python information retrieval system for attribute- and opinion-focused product review search, comparing retrieval approaches through manual Precision@k evaluation and iterative query refinement.
Project Overview
This project examines how an information retrieval system can help users locate customer reviews that address a particular product attribute or experience. A useful result must do more than mention the product: it must contain evidence relevant to the user's question. For example, a review that mentions battery life may still be unhelpful if the query specifically asks whether the battery lasts through extended use.
The research objective is to assess how different retrieval approaches translate a written query into a ranked set of reviews. The emphasis is on relevance near the top of the ranking, where users are most likely to read, and on understanding discrepancies between shared vocabulary and the underlying information need.
Implementation
The Python workflow accepts a user query, evaluates candidate reviews using the implemented retrieval approaches, and returns results ordered by their relevance scores. Comparing multiple models makes it possible to inspect how different ranking rules change the evidence presented to the user, even when the underlying review collection and query remain the same.
Query refinement provides an additional way to examine retrieval behavior. Changes to attribute names, descriptive terms, or opinion wording can alter which reviews receive high scores. Inspecting these changes helps identify cases in which a model responds strongly to matching words but retrieves passages that fail to answer the intended question. This makes review-level error analysis an essential complement to numerical evaluation.
Evaluation
Ranking quality was assessed through manual Precision@k evaluation. For each evaluated query, the first k retrieved reviews were inspected and assigned relevance judgments. Precision@k is the number of relevant reviews in those first k positions divided by k, so it directly measures the proportion of the visible result list that addresses the information need.
The relevance decision must consider both the requested attribute and the opinion or experience associated with it. Merely mentioning an attribute is insufficient when the query asks about a specific quality. Comparisons are most interpretable when the cutoff k and judgment criteria remain consistent across models. Precision@k evaluates the usefulness of the selected results, but does not measure how many relevant reviews were missed elsewhere in the collection or distinguish different orderings within the top k.
Challenges and Lessons
The principal difficulty is that linguistic similarity and relevance are related but not identical. Negation can reverse an opinion without substantially changing its vocabulary, while paraphrases can express the same experience through different words. Reviews may also discuss several attributes, making an overall positive or negative tone an unreliable guide to the particular issue raised in a query.
The project demonstrated why retrieval development benefits from an explicit feedback loop: inspect highly ranked results, identify the source of irrelevant matches, refine the query or approach, and reevaluate. Manual judgments make these errors visible, although their subjectivity and limited coverage constrain the conclusions. Refinements informed by a query set should also be distinguished from performance on previously unseen queries.