Glossary
A
API (Application Programming Interface): A way for two programs to talk to each other over the internet. Your mobile app sends a request to the API, and the server sends back a response.
Agentic AI: An AI model that can use tools (like a calculator or search engine) and make decisions about which tools to call to complete a task.
Async / Asynchronous: Code that doesn't block while waiting. When you fetch data from an API, the app stays responsive rather than freezing. Marked with async before the function and await before the slow operation.
B
Backend: The server-side part of an application. It stores data, runs business logic, and serves APIs. In this project, the backend is Flask + SQLite.
Blueprint (Flask): A way to organize Flask routes into separate files. Like having a "user routes" file and a "chat routes" file instead of everything in one file.
C
Chunking: Splitting a long document into smaller pieces before embedding. Each chunk gets its own vector, making search more precise.
CI/CD (Continuous Integration / Continuous Deployment): Automated pipelines that run tests and deploy code when you push to a repository. CI runs tests; CD deploys.
Client: The frontend part of an application that users interact with directly. In this project, the client is the React Native mobile app.
Container: A lightweight, portable package that contains your app and all its dependencies (Python, libraries, config). Runs the same everywhere.
CORS (Cross-Origin Resource Sharing): A browser security feature that blocks a web page from making requests to a different domain than the one that served the page. You need to configure CORS on your backend to allow your mobile app to connect.
Cosine Similarity: A measure of how similar two vectors are. 1.0 = same direction (same meaning), 0.0 = unrelated. Used in RAG to find relevant documents.
CRUD (Create, Read, Update, Delete): The four basic operations for persistent storage. In an API: POST (Create), GET (Read), PUT/PATCH (Update), DELETE (Delete).
D
Database: A structured collection of data. This project uses SQLite (a file-based database) for development.
Dependency: An external package or library that your project needs. Listed in requirements.txt (Python) or package.json (Node.js).
Docker: A platform for running applications in containers. Uses a Dockerfile as a recipe and Docker Compose to run multiple services.
Docker Compose: A tool for defining and running multiple Docker containers together. Example: your Flask app + PostgreSQL database.
E
Embedding: A list of numbers (a "vector") that represents the meaning of a piece of text. Similar texts have similar embeddings.
Endpoint: A specific URL + HTTP method combination that performs one action. Example: POST /api/chat sends a message and gets an AI reply.
Environment Variable: A value stored outside your code (like in a .env file) for sensitive information such as API keys. Prevents accidentally committing secrets to git.
F
FlatList: A React Native component for rendering scrollable lists of data. It only renders items that are visible on screen (virtualized), making it fast for long lists.
Flask: A lightweight Python web framework for building web applications and APIs.
Function Calling: An OpenAI API feature that lets the model request calling a function (like get_weather). The developer runs the function and returns the result. This is how agentic AI works.
G
Git: A version control system that tracks changes to your files. Lets you save versions, go back in time, and collaborate with others.
.gitignore: A file that tells Git which files to ignore (like venv/, .env, __pycache__/).
H
HTTP (Hypertext Transfer Protocol): The protocol used for communication between clients and servers. Defines methods (GET, POST, etc.), status codes (200, 404, etc.), and headers.
J
JSON (JavaScript Object Notation): A lightweight data format used for API communication. Looks like {"name": "Alice", "age": 25}. Both Python and JavaScript can easily convert to/from JSON.
L
LLM (Large Language Model): An AI model trained on vast amounts of text that can generate human-like responses. Examples: GPT-4o, Claude, Gemini.
L
Linter: A tool that checks your code for errors, unused imports, and style issues. This project uses ruff.
M
Metrics: Numerical data about your app's performance, such as request count and response time. Exposed via /api/metrics.
Middleware: Code that runs between the request and the response. For example, CORS middleware adds headers to every response.
Migration: Changing the database schema over time (adding/removing tables or columns). SQLite with SQLAlchemy usually recreates tables; PostgreSQL migrations are more formal.
Mocking: Replacing a real function or API call with a fake version during testing. Used to avoid calling real APIs (and paying for them) in tests.
Model: 1) In AI — the LLM (e.g., GPT-4o-mini). 2) In databases — a class that represents a table (e.g., class Message(db.Model)).
O
ORM (Object-Relational Mapping): A library that lets you work with databases using Python objects instead of writing SQL. SQLAlchemy is an ORM.
P
pgvector: A PostgreSQL extension that adds vector similarity search. Used in RAG to find documents similar to a user's question.
Pre-commit hooks: Automated checks that run before every git commit. If a check fails, the commit is blocked.
Promise: An object representing a future value in JavaScript. async/await is a cleaner way to work with promises.
Provider: A company that offers LLM API access. Examples: OpenAI, Anthropic, Google, DeepSeek.
R
RAG (Retrieval-Augmented Generation): A technique that adds a knowledge base search step before calling the LLM. The LLM answers using retrieved documents instead of just its training data.
React Native: A framework for building mobile apps using React and TypeScript. Compiles to native iOS and Android code.
Repository (repo): A Git-tracked folder containing your project's files and full version history.
Route: A URL pattern on a web server. Example: /api/messages is a route. Routes are defined with decorators in Flask: @app.route('/api/messages').
ruff: A fast Python linter and formatter. Catches errors, unused imports, and style issues. Run with ruff check .
S
Schema: The structure of a database table — which columns exist and their types.
Sentence embeddings: A technique that converts an entire sentence or paragraph into a single vector. Used by models like all-MiniLM-L6-v2.
SQLite: A lightweight, file-based database. Stores everything in a single .db file. Great for development, not recommended for production.
Status Code: A 3-digit number in an HTTP response that indicates success (2xx), redirection (3xx), client error (4xx), or server error (5xx).
Streaming: Sending AI response data as it's generated, token by token, rather than waiting for the complete response. Makes the chat feel faster.
T
Token: A unit of text that an LLM processes. A token is roughly 0.75 words. "Hello world" is ~2 tokens. Pricing is based on tokens.
Traceback: The list of function calls shown when a Python error occurs. Read it from bottom to top to find the root cause.
TypeScript: JavaScript with added type annotations. Catches errors at compile time instead of runtime.
V
Virtual Environment (venv): An isolated Python environment for a project. Each project gets its own dependencies without conflicting with other projects.
W
WSL2 (Windows Subsystem for Linux 2): A full Linux kernel running inside Windows. Gives Windows users a Linux terminal and avoids many Python installation issues.