Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/diazdavilajesus16-stack/IA-LUMINA/llms.txt

Use this file to discover all available pages before exploring further.

Lumina AI is built around the Peruvian secondary school curriculum. Every subject in the app maps to a curated set of subtopics, each backed by detailed intent responses in respuestas.json and keyword detection in chatbot.py. Students can browse subjects visually through the Materias panel, or simply ask a question naturally and let Lumina match the intent automatically.

The Materias panel

The Materias panel is a subject browser that appears as a collapsible side column in the Chat page. Toggle it with the Materias → button in the top-right corner of the chat area. When open, the panel occupies roughly one-third of the screen width alongside the chat thread. Inside the panel, each of the 18 subjects is an expandable accordion. Clicking a subject expands it to reveal its subtopics. Clicking a subtopic button sends the following message to the chat:
Explícame {materia} - {subtema}
For example, clicking Cinemática under Física sends Explícame ⁜ Física - Cinemática and triggers a full explanation from the chatbot.
You do not need the Materias panel to get subject help. You can ask conversationally—“¿Cómo se calcula el área de un círculo?” or “Explícame las leyes de Newton”—and Lumina will match your intent automatically. The panel is most useful when you want to explore a subject you are not sure how to phrase.

All 18 subjects and subtopics

SubjectSubtopics
FísicaCinemática, Dinámica, Electricidad, Ondas
AritméticaNúmeros, Fracciones, Porcentajes, Razones
GeometríaTriángulos, Círculos, Polígonos, Volúmenes
TrigonometríaSeno/Coseno, Tangente, Identidades
ÁlgebraEcuaciones, Polinomios, Factorización
QuímicaÁtomos, Enlaces, Reacciones, Estequiometría
R. MatemáticoSucesiones, Lógica, Problemas
R. VerbalComprensión, Sinónimos, Analogías
LiteraturaGéneros, Figuras Lit., Autores
Historia PerúPreinca, Inca, Colonial, República
Historia UniversalAntigüedad, Medievo, Moderna
EconomíaMicro, Macro, Mercados, Finanzas
Desarrollo PersonalAutoestima, Metas, Hábitos
CiudadaníaDerechos, Constitución, Democracia
InglésGramática, Vocabulario, Reading
ArteHistoria del Arte, Música, Teatro
Educación FísicaAtletismo, Deportes, Salud
Educ. TrabajoEmprendimiento, Ofimática, Gestión

Keyword-based intent matching

When you type a question directly in the chat, Lumina uses a two-layer detection system defined in chatbot.py. The primary layer is a Keras neural network; if its confidence score falls below the threshold, a keyword fallback scans your message for topic words. The _KEYWORD_MAP in chatbot.py defines the keyword categories Lumina recognizes. The table below shows how natural language maps to subject areas:
CategoryRecognized keywords
matematicas_generalmatemática, matemáticas, números, cálculo, aritmética
algebraálgebra, ecuación, variable, incógnita, factori, polinomio
fraccionesfracción, fracciones, numerador, denominador, mcm
geometriageometría, área, perímetro, triángulo, círculo, rectángulo, pitágoras, volumen
trigonometriatrigonometría, seno, coseno, tangente, soh, cah, toa
probabilidadprobabilidad, estadística, media, mediana, moda, varianza
biologiabiología, célula, fotosíntesis, adn, mitosis, meiosis, ecosistema, evolución, gen
quimicaquímica, átomo, molécula, enlace, ph, ácido, base, tabla periódica, electrón
fisicafísica, newton, fuerza, velocidad, aceleración, energía, gravedad, movimiento, potencia
CategoryRecognized keywords
historiahistoria, guerra, revolución, edad media, renacimiento, conquista, independencia, civilización
literaturaliteratura, cuento, novela, metáfora, hipérbole, narrador, género literario, poema, ensayo
geografiageografía, continente, país, mapa, volcán, terremoto, relieve, atmósfera
programacionprogramación, python, código, algoritmo, función, bucle, html, javascript, variable programación
CategoryRecognized keywords
tecnicas_estudioestudiar, técnica estudio, pomodoro, apuntes, memorizar, concentración, resumen, mapa conceptual
motivaciondesmotivado, no puedo, me rindo, para que estudiar, no sirvo, soy malo, cansado de estudiar
habitosprocrastinar, hábito, disciplina, constancia, organización, tiempo, horario
examenexamen, prueba, test, evalúa, mañana tengo, no estudié
concentracionconcentrar, distrae, distracción, celular distrae, enfoque, no me concentro
ansiedad_academicaansiedad, nervioso examen, bloqueo, me quedo en blanco, pánico
salud_mental_estudioagotado, burnout, quemado, mucho estudio, necesito descanso
CategoryRecognized keywords
saludohola, buenas, hey, saludos, buenos dias, buenas tardes, buenas noches
despedidaadios, bye, hasta luego, chao, nos vemos, me voy
curiosidadescuriosidad, dato curioso, algo interesante, sorpréndeme, sabías que
agradecimientogracias, muchas gracias, me ayudaste, excelente, muy bien
chistechiste, gracioso, hazme reír, algo divertido
no_entendidono entiendo, no comprendo, explica de nuevo, repite, más simple

How the intent system works

The intent pipeline runs in cascade order:
1

Neural network (high confidence)

The Keras model scores the input against all known intents. If any intent exceeds the 0.60 confidence threshold, that intent is used directly and its response is returned.
2

Keyword fallback

If no intent clears 0.60, the _keyword_fallback() function scans the normalized input for matches in _KEYWORD_MAP. The category with the most keyword hits wins and is assigned a synthetic probability of 0.50.
3

Neural network (low confidence)

If keyword matching also finds nothing, the model result is accepted if it exceeds the lower 0.35 threshold.
4

Generic fallback

If all three layers fail, Lumina returns a contextual fallback message that references the most recently matched intent from the conversation, offering to continue on that topic.

Build docs developers (and LLMs) love