This project is a general-purpose AI agent that reads a batch of natural-language tasks and produces an answer for each one. It is packaged as a self-contained Docker container that reads an input file of tasks and writes a structured file of results. The agent handles eight distinct task types: factual question answering, multi-step math word problems, sentiment analysis, text summarization, named-entity recognition, code generation, code debugging, and logic puzzles. The tasks arrive with no label saying which type they are, so the agent must first work out what each one is asking for. It does this with a two-stage classifier. A fast rule-based layer recognizes clear cases from their wording and structure; when a task is ambiguous or unfamiliar, it hands the decision to the language model, which chooses among only the categories still in contention. This keeps routing reliable even for phrasings the simple rules have never seen. Once a task is classified, the agent applies a prompting strategy built specifically for that kind of problem. Math and logic tasks are solved by first laying out the given facts and the implications between them, which stops the reasoning from skipping steps. Debugging tasks analyze the faulty code and its edge cases before producing a corrected version. Entity extraction returns clean structured JSON, sentiment returns a label with a short justification, and summarization respects the requested format and length. A final extraction layer pulls the answer out of the model's response and normalizes alternative formats, such as LaTeX-formatted math, so every task ends with a single clean result. The entire pipeline runs locally inside the container, with no dependence on any external service.
Category tags: