PetrochukM /
PyTorch-NLP
Basic Utilities for PyTorch Natural Language Processing (NLP)
Loading repository dataβ¦
Tamar-Klein / repository
Natural Language to CLI Agent | AI Safety & Prompt Engineering π€ An intelligent translator converting natural language into Windows/Linux/Mac commands. Built with Python & GPT-4o-mini, featuring strict Safety Guardrails (Safe/Dangerous/Forbidden classification) and a Gradio UI to prevent system damage.
π€ Natural Language to CLI Agent (MVP) An intelligent translator that converts natural language instructions into precise terminal commands. This project focuses on Prompt Engineering and Safety Guardrails to ensure that AI-generated commands are accurate and secure before execution.
π Key Features Multi-Platform Support: Generates syntax for Windows (CMD), Linux, and macOS.
Safety Classification System: Implements a 3-tier safety logic:
β SAFE: Informational or non-destructive commands.
β οΈ DANGEROUS: Potential data-loss operations (tagged for user approval).
π« FORBIDDEN: Blocks catastrophic or system-damaging commands (e.g., format).
Context Awareness: Automatically leverages system environment variables (like %USERPROFILE%) and ensures proper path quoting for high reliability.
User-Friendly Interface: Built with Gradio for seamless interaction.
π§ Prompt Engineering Strategy The core of this project is a sophisticated System Prompt that enforces strict output rules:
Zero-Shot Classification: Categorizing commands in real-time without prior training data.
Strict Format Control: Ensuring the LLM returns only the command string, preventing conversational "noise" that would break a terminal execution.
Error Handling: Built-in mechanisms to catch API exceptions and provide clean user feedback.
π οΈ Tech Stack Language: Python
AI Engine: OpenAI GPT-4o-mini
Frontend/UI: Gradio
Environment: Dotenv for secure API key management
βοΈ Installation & Usage Clone the repository:
Install dependencies:
Configure Environment: Create a .env file in the root directory and add your key:
Run the Application:
π Evaluation & Metrics The system was tested against various Edge Cases (ambiguous instructions, dangerous commands, system-specific syntax) to achieve high accuracy and safety reliability. Through iterative prompt optimization, the agent ensures that dangerous operations are never presented as "safe".
Selected from shared topics, language and repository descriptionβnot editorial ratings.
PetrochukM /
Basic Utilities for PyTorch Natural Language Processing (NLP)
code-kern-ai /
The data scientist's open-source choice to scale, assess and maintain natural language data. Treat training data like a software artifact.
machinalis /
A python framework to transform natural language questions to queries in a database query language.
miscusi-peek /
Connect Cursor, Copilot & Claude AI directly to Cheat Engine via MCP. Automate reverse engineering, pointer scanning, and memory analysis using natural language.
taishi-i /
A curated list of resources for Japanese natural language processing (NLP): Python libraries, LLMs, dictionaries, corpora, and datasets. Includes Claude Code skills to search resources.
hamelsmu /
Code For Medium Article: "How To Create Natural Language Semantic Search for Arbitrary Objects With DeepΒ Learning"