AI 资讯
Cómo hablar con tu base de datos usando IA y construir un extractor SQL seguro con Streamlit
Abstract Cada vez más equipos quieren consultar datos sin escribir SQL a mano. El problema es que un sistema Text-to-SQL no solo debe “traducir preguntas”, sino también entender el esquema, restringir permisos, validar consultas y explicar por qué una consulta es rápida o lenta. Ese enfoque coincide con la ruta propuesta por el tutorial oficial de LangChain para agentes SQL: listar tablas, inspeccionar esquemas, generar la consulta, revisarla, ejecutarla y corregir errores hasta obtener una respuesta; y el propio tutorial advierte que ejecutar SQL generado por modelos tiene riesgos y exige permisos mínimos. En paralelo, la documentación oficial de Python recomienda usar placeholders en sqlite3 para enlazar parámetros y evitar inyección SQL, mientras que la documentación de SQLite explica que EXPLAIN QUERY PLAN permite inspeccionar si una consulta hace SCAN, SEARCH y si usa índices. manueldongo23 / sql_ai_sales_assistant_demo SQL AI Sales Assistant A safe Text-to-SQL demo that converts natural language business questions into SQL queries, executes them on a local SQLite retail database, and shows the generated SQL plus EXPLAIN QUERY PLAN . This project was created as evidence for an article about SQL AI Database Solutions . Topic Talk to your database with AI: build a safe SQL query extractor with Streamlit and SQLite. Features Natural language prompts such as sales by month , top customers , sales in Lima . Rule-assisted NL→SQL generation, designed to be transparent and auditable. SQLite demo database with customers, products, orders and order items. Read-only SQL validator that blocks destructive commands. Parameterized queries for user-provided filters. Streamlit interface. CLI demo for quick testing. Query plan inspection with EXPLAIN QUERY PLAN . Architecture User question ↓ NL → SQL interpreter ↓ Read-only SQL validator ↓ SQLite execution ↓ Results + EXPLAIN QUERY … View on GitHub Cuerpo del artículo La promesa de SQL + IA suena sencilla: le haces una pregunta
AI 资讯
How to Build AI Agents in 2026: The Actually Simple Guide
Building an AI agent sounds complicated. It's not. By the end of this guide, you'll have a working agent that can search the web, remember conversations, and handle multi-step tasks. No frameworks, just TypeScript and an LLM API. What We're Building A research assistant agent that: Takes questions from users Uses tools (web search) when needed Remembers conversation history Handles errors without crashing Runs in about 150 lines of TypeScript This won't be production-ready, but it'll work and you'll understand every line. Prerequisites You need: Node.js 18 or higher Basic TypeScript knowledge An Anthropic API key ( get one free ) That's it. No prior AI experience needed. Setup (5 minutes) # Create project mkdir research-agent cd research-agent npm init -y # Install dependencies npm install @anthropic-ai/sdk dotenv # Install dev dependencies npm install -D typescript @types/node tsx # Initialize TypeScript npx tsc --init Create .env : ANTHROPIC_API_KEY = your-key-here Step 1: Define Your Types Create src/types.ts : export interface Message { role : ' user ' | ' assistant ' ; content : string ; } export interface Tool { name : string ; description : string ; input_schema : { type : ' object ' ; properties : Record < string , any > ; required ?: string []; }; execute : ( input : any ) => Promise < string > ; } Why these types matter: Strong typing prevents bugs. If you change how a tool works, TypeScript tells you everywhere that breaks. Step 2: Create a Simple Tool Create src/tools/search.ts : import { Tool } from ' ../types ' ; export const searchTool : Tool = { name : ' search_web ' , description : ' Search the internet for current information. Use this when you need facts, recent events, or data you do not know. ' , input_schema : { type : ' object ' , properties : { query : { type : ' string ' , description : ' The search query ' , }, }, required : [ ' query ' ], }, execute : async ( input : { query : string }) => { console . log ( `[Tool] Searching for: ${ input
AI 资讯
Quaso
AI automation agent to get stuff done across apps or browser Discussion | Link
开发者
Eternal Software Initiative Based on Subleq One-Instruction-Set Computer
开发者
Car touchscreens are cheap, not good
AI 资讯
Microsoft lays off nearly 5,000 employees across Xbox, commercial sales
Microsoft cut around 4,800 roles, or 2.1% of its global workforce, on Monday — the latest in a series of layoffs that’s stoking fears of AI replacing jobs. The layoffs will hit Xbox and commercial sales the hardest.
开发者
1k Words: A Writing Contest
科技前沿
A USB-C port isn't a guarantee of high speeds: here's why
USB-C promised simplicity, but has turned into a mystery box of different specs.
开发者
Tom Colicchio's Final Service
AI 资讯
Electric anti-aircraft interceptor drone breaks world air speed record at 434mph
安全
CS2 Fog Of War: Server-sided anti-wallhack occlusion culling for CS2 servers
AI 资讯
Reddit is using LLMs to solve a problem LLMs largely created
In the AI era, platforms have no choice but to fight fire with fire to cull spam.
开发者
I was wrong about game development
AI 资讯
Show HN: Nectar, a Rust-like React that compiles to WebAssembly
After a pretty rough gig experience, I wanted to remind myself that I was a vaguely capable developer. I had recently jumped on the Rust train and wanted a Rust equivalent of React that is more performant and easier to work with. I also wondered if I could effectively eject Javascript. This project came from that... Nectar is a programming language that compiles your entire app, logic, state, and rendering, to WebAssembly. JavaScript is reduced to a roughly 10 KB syscall layer that only bridges
科技前沿
There were not one, but two asteroid encounters this weekend
The Torifune asteroid turns out to be shaped like a peanut.
AI 资讯
The DJI Osmo Pocket 3 lookalike is down to $329
Initially, I was going to tell you about a good deal happening on the DJI Osmo Pocket 3, which is down from the $500 it’s sold at most of the year to $378 at multiple retailers. But there’s a better deal happening on a nearly identical portable camera, the Xtra Muse, which is $329 (roughly […]
AI 资讯
You Don't Own Your .io or .ai. You Rent a Country's Politics
开发者
Multilingual Experience Linked to Delayed Aging in Populations and Individuals
AI 资讯
Google Chrome Installed a 4GB AI Model on Your PC
AI 资讯
AMD Ryzen AI Halo – $4k AI Dev Kit