Skip to content

Commit 4e695be

Browse files
authored
Merge pull request #16 from ahmed33033/13-define-a-few-more-terms
13 define a few more terms
2 parents 76dd293 + 9916574 commit 4e695be

9 files changed

Lines changed: 133 additions & 68 deletions

File tree

app/contribute/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default function Contribute() {
1010
As an opensource project, the Simple AI Dictionary is always looking for
1111
contributors!
1212
</ProseP>
13-
<ProseP className="text-center ">
13+
<ProseP className="text-left mt-4 ">
1414
Whether that&apos;s contributing a new definition, critiquing an
1515
existing one or even suggesting some stylistic changes, all valued
1616
contributions are welcome through the{" "}

app/page.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Link from "next/link";
2-
import { termsPlaceholder } from "@/lib/terms";
2+
import { terms } from "@/lib/terms";
33
import { term_of_the_day } from "@/lib/term-of-the-day";
44
import { SimpleCard } from "@/components/definition_card/simple_card";
55
import { Card } from "@/components/ui/card";
@@ -13,21 +13,21 @@ export default function Home() {
1313
Today&apos;s &nbsp;
1414
<span>Buzzword</span>
1515
</h1>
16-
<SimpleCard term={term_of_the_day} />
16+
<SimpleCard term={term_of_the_day} termType="simple" />
1717
</article>
1818
<article className="min-w-fit flex items-center flex-col">
1919
<h1 className="text-center px-4 text-2xl text-primary mb-2 font-playfair-display">
2020
Discover
2121
</h1>
2222
<Card className="border border-border p-4 bg-secondary px-5 basis-48 overflow-scroll">
2323
<ul className="list-none grid grid-cols-2 grid-flow-row px-2 gap-2 gap-x-8 ">
24-
{termsPlaceholder.slice(0, 12).map((term) => (
25-
<li className="text-center" key={term}>
24+
{terms.slice(0, 12).map((term) => (
25+
<li className="text-center" key={term.name}>
2626
<Link
2727
className="capitalize text-primary hover:underline decoration-2 "
28-
href={`/term/${term}`}
28+
href={`/term/${term.name}`}
2929
>
30-
{term}
30+
{term.name}
3131
</Link>
3232
</li>
3333
))}

app/term/[name]/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { TermDefinition } from "@/components/definition_card/term_definition";
2-
import { termsPlaceholder } from "@/lib/terms";
2+
import { terms } from "@/lib/terms";
33

44
export function generateStaticParams() {
5-
return termsPlaceholder.map((term) => ({
6-
name: term,
5+
return terms.map((term) => ({
6+
name: term.name,
77
}));
88
}
99

components/MainSearch.tsx

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use client";
22
import { useState } from "react";
33
import { useRouter } from "next/navigation";
4-
import { termsPlaceholder } from "@/lib/terms";
4+
import { terms } from "@/lib/terms";
55
import {
66
Combobox,
77
ComboboxContent,
@@ -16,10 +16,17 @@ export function MainSearch() {
1616
const router = useRouter();
1717
const inputRef = useRef<HTMLInputElement>(null);
1818
const [inputValue, setInputValue] = useState<string | undefined>("");
19+
const expandedTerms = [];
20+
for (const term of terms) {
21+
expandedTerms.push({ name: term.name, url: term.name });
22+
for (const related of term.related_terms) {
23+
expandedTerms.push({ name: related, url: term.name });
24+
}
25+
}
1926
return (
2027
<div className="mt-4 border border-border rounded-full shadow-md">
2128
<Combobox
22-
items={termsPlaceholder}
29+
items={expandedTerms}
2330
autoHighlight
2431
openOnInputClick={false}
2532
limit={5}
@@ -38,15 +45,15 @@ export function MainSearch() {
3845
<ComboboxList>
3946
{(item) => (
4047
<ComboboxItem
41-
key={item}
42-
value={item}
48+
key={item.name}
49+
value={item.name}
4350
onClick={(e) => {
44-
router.push(`/term/${item}`);
51+
router.push(`/term/${item.url}`);
4552
inputRef.current?.blur();
4653
}}
4754
className="cursor-pointer"
4855
>
49-
{item}
56+
{item.name}
5057
</ComboboxItem>
5158
)}
5259
</ComboboxList>

components/definition_card/simple_card.tsx

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,42 @@ import { BaseDefinitionCard } from "@/components/definition_card/base/base_defin
33
import { DefintionHeader } from "./base/defintion_header";
44
import { DefinitionContent } from "./base/definition_content";
55
import { DiagramImage } from "./base/diagram_image";
6+
import clsx from "clsx";
67

7-
export function SimpleCard({ term }: { term: string }) {
8+
export function SimpleCard({
9+
term,
10+
termType,
11+
}: {
12+
term: string;
13+
termType: string;
14+
}) {
815
const retrieved_term = getTermObj(term);
9-
const diagram = retrieved_term.simple_diagram;
16+
let termTypeObj = null;
17+
if (termType == "simple") {
18+
termTypeObj = retrieved_term.simple;
19+
} else {
20+
termTypeObj = retrieved_term.software;
21+
}
1022
return (
1123
<BaseDefinitionCard>
1224
<div className="flex flex-col @md:flex-row items-center">
13-
<div className="@md:w-6/10">
25+
<div
26+
className={clsx({ "@md:w-6/10": termTypeObj.diagram !== undefined })}
27+
>
1428
<DefintionHeader
1529
name={retrieved_term.name}
16-
type={retrieved_term.simple.type}
30+
type={termTypeObj.type}
1731
related_terms={retrieved_term.related_terms}
1832
/>
1933
<DefinitionContent
20-
definition={retrieved_term.simple.definition}
21-
example={retrieved_term.simple.example}
34+
definition={termTypeObj.definition}
35+
example={termTypeObj.example}
2236
/>
2337
</div>
24-
{diagram !== undefined && (
38+
{termTypeObj.diagram !== undefined && (
2539
<DiagramImage
2640
className="mt-5 @md:mt-0 @md:w-4/10"
27-
diagram={diagram}
41+
diagram={termTypeObj.diagram}
2842
/>
2943
)}
3044
</div>

components/definition_card/software_card.tsx

Lines changed: 0 additions & 21 deletions
This file was deleted.

components/definition_card/term_definition.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
22
import { getTermObj } from "@/lib/terms";
33
import { SimpleCard } from "@/components/definition_card/simple_card";
4-
import { SoftwareCard } from "./software_card";
54
import { ProseP } from "../prose/ProseP";
65

76
export function TermDefinition({ term }: { term: string }) {
@@ -24,10 +23,10 @@ export function TermDefinition({ term }: { term: string }) {
2423
</TabsList>
2524
</div>
2625
<TabsContent value="simple">
27-
<SimpleCard term={term} />
26+
<SimpleCard term={term} termType="simple" />
2827
</TabsContent>
2928
<TabsContent value="software">
30-
<SoftwareCard term={term} />
29+
<SimpleCard term={term} termType="software" />
3130
</TabsContent>
3231
</Tabs>
3332
);

eslint.config.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const eslintConfig = defineConfig([
1414
"build/**",
1515
"next-env.d.ts",
1616
]),
17-
eslintConfigPrettier
17+
eslintConfigPrettier,
1818
]);
1919

20-
export default eslintConfig
20+
export default eslintConfig;

lib/terms.ts

Lines changed: 84 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,8 @@
1-
export const termsPlaceholder: Array<string> = [
2-
"agent",
3-
"skill",
4-
"fine-tuning",
5-
"RAG",
6-
"harness",
7-
"MCP",
8-
"agent.md",
9-
"vibe-coding",
10-
"hallucination",
11-
];
12-
131
export interface fieldDefinition {
142
type: string;
153
definition: string;
164
example: string;
5+
diagram?: diagram;
176
}
187

198
export interface diagram {
@@ -26,8 +15,6 @@ export interface term {
2615
related_terms: Array<string>;
2716
simple: fieldDefinition;
2817
software: fieldDefinition;
29-
simple_diagram?: diagram;
30-
software_diagram?: diagram;
3118
}
3219

3320
/*
@@ -47,6 +34,10 @@ const agent: term = {
4734
"An AI-model that uses additional, external data to generate a response.",
4835
example:
4936
"An agent can tackle certain tasks with you or for you, from acting as a virtual project manager to handling more complex assignments like reconciling financial statements to close the books (Susanna Ray, Microsoft, 2024).",
37+
diagram: {
38+
src: "/mermaid_diagrams/agent_simple",
39+
alt: "Simple drawing of agent requesting and receiving data, before responding to user.",
40+
},
5041
},
5142
software: {
5243
type: "Pattern",
@@ -55,13 +46,88 @@ const agent: term = {
5546
example:
5647
"More specifically, agents in financial services can monitor transaction flows, assess risk factors, and handle tasks like approving routine loans or flagging suspicious activity in real time (Sydney Scott, Workday, 2025).",
5748
},
58-
simple_diagram: {
59-
src: "/mermaid_diagrams/agent_simple",
60-
alt: "Simple drawing of agent requesting and receiving data, before responding to user.",
49+
};
50+
51+
const agi: term = {
52+
name: "AGI",
53+
related_terms: ["Artificial General Intelligence"],
54+
simple: {
55+
type: "Status",
56+
definition: "Refers to AI systems that think and reason like human beings.",
57+
example:
58+
"Currently, true AGI does not exist, but research and development efforts are ongoing (Google Cloud, 2026).",
59+
},
60+
software: {
61+
type: "Intelligence Type",
62+
definition:
63+
"AI systems that mirror how humans reason, with abilities like the transfer of knowledge across domains and the ability to use common sense logic.",
64+
example:
65+
"AGI systems conceivably could handle novel situations, not just perform well on a single, narrow task (Stanford HAI, n.d.).",
66+
},
67+
};
68+
69+
const fine_tune: term = {
70+
name: "fine-tune",
71+
related_terms: ["fine-tuning", "fine-tuned"],
72+
simple: {
73+
type: "Specialization Strategy",
74+
definition:
75+
"Using specialized data to help make an AI-model perform better at particular tasks.",
76+
example:
77+
"Fine-tuning connects the intelligence in general-purpose LLMs to enterprise data, enabling organizations to adapt generative AI (GenAI) models to their unique business needs with higher degrees of specificity and relevance (Databricks Staff, n.d.).",
78+
},
79+
software: {
80+
type: "Tuning Technique",
81+
definition: "Further training an LLM to better perform specialized tasks.",
82+
example:
83+
"By leveraging prior model training through transfer learning, fine-tuning can reduce the amount of expensive computing power and labeled data needed to obtain large models tailored to niche use cases and business needs (Dave Bergmann, IBM, n.d.).",
84+
},
85+
};
86+
87+
const multi_agent: term = {
88+
name: "multi-agent",
89+
related_terms: ["multi-agent system"],
90+
simple: {
91+
type: "Software Pattern",
92+
definition: "Connecting multiple agents together to accomplish a goal.",
93+
example:
94+
"Multi-agent systems make the workflow more modular and give each stage a clear role (Ayoola Olafenwa, towards data science, 2026).",
95+
},
96+
software: {
97+
type: "Architecture",
98+
definition:
99+
"A flow composed of multiple agents, where each agent completes a specialized task, to collectively complete a goal.",
100+
example:
101+
"Multi-agent patterns are particularly valuable when a single agent has too many tools and makes poor decisions about which to use, when tasks require specialized knowledge with extensive context (long prompts and domain-specific tools), or when you need to enforce sequential constraints that unlock capabilities only after certain conditions are met (Langchain, n.d.).",
102+
},
103+
};
104+
105+
const hallucinate: term = {
106+
name: "hallucinate",
107+
related_terms: ["hallucination"],
108+
simple: {
109+
type: "Behaviour",
110+
definition:
111+
"When an AI model generates false facts, especially ones that less obvious.",
112+
example:
113+
'Consider the prompt: "What is Adam Tauman Kalai\'s birthday? If you know, just respond with DD-MM." On three separate attempts, a state-of-the-art open-source language model output three incorrect dates: “03-07”, “15-06”, and “01-01”, even though a response was requested only if known (Kalai et al., OpenAI, 2025).',
114+
},
115+
software: {
116+
type: "Behaviour",
117+
definition:
118+
"When an LLM generates inaccurate statements, or makes up data where it doesn't exist.",
119+
example:
120+
"Hallucinations undermine the reliability and trustworthiness of LLMs, especially in domains requiring factual accuracy (Alansari and Luqman, arxiv, 2025).",
61121
},
62122
};
63123

64-
export const terms: Array<term> = [agent];
124+
export const terms: Array<term> = [
125+
agent,
126+
agi,
127+
fine_tune,
128+
multi_agent,
129+
hallucinate,
130+
];
65131
export function getTermObj(selected_term: string) {
66132
return terms.filter((term) => term.name === selected_term)[0];
67133
}

0 commit comments

Comments
 (0)