Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/rohitg00/ai-engineering-from-scratch
/ functions
Functions
8,347 in github.com/rohitg00/ai-engineering-from-scratch
⨍
Functions
8,347
◇
Types & classes
1,490
↳
Endpoints
1
↓ 1 callers
Function
buildRagPrompt
(query: string, chunks: string[])
phases/11-llm-engineering/06-rag/code/main.ts:81
↓ 1 callers
Function
buildServer
()
phases/19-capstone-projects/03-realtime-voice-assistant/code/ts/src/server.ts:49
↓ 1 callers
Function
buildSlackResponse
(report: AgentReport)
phases/19-capstone-projects/06-devops-troubleshooting-agent/code/ts/src/blocks.ts:3
↓ 1 callers
Function
build_agents
()
phases/14-agent-engineering/15-crewai-role-based-crews/code/main.py:232
↓ 1 callers
Function
build_app
Wire the four-node ReAct graph and return (compiled_app, llm_with_tools).
phases/11-llm-engineering/16-langgraph-state-machines/code/main.py:77
↓ 1 callers
Function
build_arithmetic_task
()
phases/19-capstone-projects/49-lm-eval-harness/code/main.py:391
↓ 1 callers
Function
build_cai_sft_corpus
Phase 1: generate initial response, critique, revise, keep revised as the SFT target.
phases/18-ethics-safety-alignment/05-constitutional-ai-rlaif/code/main.py:81
↓ 1 callers
Function
build_catalog
()
scripts/build_catalog.py:247
↓ 1 callers
Function
build_choice_task
()
phases/19-capstone-projects/49-lm-eval-harness/code/main.py:427
↓ 1 callers
Function
build_code_task
()
phases/19-capstone-projects/49-lm-eval-harness/code/main.py:407
↓ 1 callers
Function
build_custom_maskrcnn
(num_classes)
phases/04-computer-vision/08-instance-segmentation-mask-rcnn/code/main.py:54
↓ 1 callers
Function
build_demo_agent
()
phases/14-agent-engineering/01-the-agent-loop/code/main.py:139
↓ 1 callers
Function
build_dense_mask
(pack: PackResult)
phases/12-multimodal-ai/06-any-resolution-patch-n-pack/code/main.py:52
↓ 1 callers
Function
build_destructive_server
()
phases/19-capstone-projects/13-mcp-server-with-registry/code/main.py:186
↓ 1 callers
Function
build_frame_probs
(target, duration_per_char=3, blank_runs=1)
phases/06-speech-and-audio/04-speech-recognition-asr/code/main.py:75
↓ 1 callers
Function
build_generation_task
()
phases/19-capstone-projects/49-lm-eval-harness/code/main.py:438
↓ 1 callers
Function
build_graph
(triples)
phases/05-nlp-foundations-to-advanced/26-relation-extraction-kg/code/main.py:48
↓ 1 callers
Function
build_graph
()
phases/14-agent-engineering/13-langgraph-stateful-graphs/code/main.py:163
↓ 1 callers
Function
build_hierarchy
()
phases/16-multi-agent-and-swarms/06-hierarchical-architecture/code/main.py:88
↓ 1 callers
Method
build_kv_cache
(self, memory: torch.Tensor)
phases/19-capstone-projects/61-cross-attention-fusion/code/main.py:176
↓ 1 callers
Function
build_lesson_entry
(lesson_dir: Path)
scripts/build_catalog.py:169
↓ 1 callers
Function
build_llava_prompt
(system: str, user: str, image_tokens: int)
phases/12-multimodal-ai/05-llava-visual-instruction-tuning/code/main.py:67
↓ 1 callers
Function
build_mask
Block-triangular mask: causal over text, bidirectional within image.
phases/12-multimodal-ai/13-transfusion-autoregressive-diffusion/code/main.py:44
↓ 1 callers
Function
build_pages
(n_pages: int = 5, n_patches: int = 16, dim: int = 32)
phases/12-multimodal-ai/23-colpali-vision-native-rag/code/main.py:49
↓ 1 callers
Function
build_phase_entry
(phase_dir: Path)
scripts/build_catalog.py:208
↓ 1 callers
Function
build_plan
( artifacts: list[Artifact], target_root: Path, layout: str, force: bool )
scripts/install_skills.py:174
↓ 1 callers
Function
build_queries
(dim: int = 32)
phases/12-multimodal-ai/23-colpali-vision-native-rag/code/main.py:59
↓ 1 callers
Function
build_queue_grid
Allocate a (world_size, world_size) grid of queues using the given context.
phases/19-capstone-projects/76-collective-ops-from-scratch/code/main.py:69
↓ 1 callers
Function
build_rag_prompt
(query, retrieved_chunks)
phases/11-llm-engineering/06-rag/code/main.py:65
↓ 1 callers
Function
build_readonly_server
()
phases/19-capstone-projects/13-mcp-server-with-registry/code/main.py:171
↓ 1 callers
Function
build_sample_cluster
()
phases/19-capstone-projects/06-devops-troubleshooting-agent/code/main.py:52
↓ 1 callers
Function
build_summary_task
()
phases/19-capstone-projects/49-lm-eval-harness/code/main.py:396
↓ 1 callers
Function
build_test_suite
()
phases/11-llm-engineering/10-evaluation/code/eval_framework.py:231
↓ 1 callers
Function
build_tree
Return nodes as (parent_index, depth-path). Index 0 is root.
phases/10-llms-from-scratch/25-speculative-decoding/code/main.py:131
↓ 1 callers
Function
build_vocab
(docs)
phases/05-nlp-foundations-to-advanced/02-bag-of-words-tfidf/code/main.py:12
↓ 1 callers
Function
build_vocab
(docs)
phases/05-nlp-foundations-to-advanced/03-word-embeddings-word2vec/code/main.py:13
↓ 1 callers
Function
build_vocab
(docs)
phases/05-nlp-foundations-to-advanced/05-sentiment-analysis/code/main.py:32
↓ 1 callers
Function
build_vocab
()
phases/12-multimodal-ai/16-mio-any-to-any-streaming/code/main.py:23
↓ 1 callers
Function
build_zero_shot_cot_prompt
(question)
phases/11-llm-engineering/02-few-shot-cot/code/advanced_prompting.py:140
↓ 1 callers
Function
build_zero_shot_prompt
(question)
phases/11-llm-engineering/02-few-shot-cot/code/advanced_prompting.py:150
↓ 1 callers
Method
by_category
(self)
phases/19-capstone-projects/82-jailbreak-taxonomy/code/main.py:119
↓ 1 callers
Function
cache_is_fresh
(entry: dict[str, object], cache_days: int)
scripts/link_check.py:201
↓ 1 callers
Method
cache_savings
(self)
phases/11-llm-engineering/11-caching-cost/code/caching_cost.py:278
↓ 1 callers
Function
cache_summary
()
phases/00-setup-and-tooling/09-data-management/code/data_utils.py:111
↓ 1 callers
Function
cai_model_sample
(prompt: list[str], model: dict, n_tokens: int = 6)
phases/18-ethics-safety-alignment/05-constitutional-ai-rlaif/code/main.py:106
↓ 1 callers
Function
cai_stage_one
(prompts_and_responses: list[tuple[str, str]])
phases/10-llms-from-scratch/09-constitutional-ai-self-improvement/code/main.py:57
↓ 1 callers
Function
calculate_cost
(model, input_tokens, output_tokens)
phases/11-llm-engineering/13-production-app/code/production_app.py:324
↓ 1 callers
Function
callMessages
(apiKey: string, request: MessagesRequest)
phases/00-setup-and-tooling/04-apis-and-keys/code/first_api_call.ts:69
↓ 1 callers
Function
callWithFallback
( chain: readonly Provider[], prompt: string, cfg: RetryConfig, )
phases/17-infrastructure-and-production/19-ai-gateways/code/main.ts:221
↓ 1 callers
Function
callWithRetry
( provider: Provider, prompt: string, cfg: RetryConfig, )
phases/17-infrastructure-and-production/19-ai-gateways/code/main.ts:188
↓ 1 callers
Function
call_llm
(doc_count: int)
phases/15-autonomous-systems/12-durable-execution/code/main.py:78
↓ 1 callers
Function
call_llm_with_retry
(prompt, model, max_retries=3)
phases/11-llm-engineering/13-production-app/code/production_app.py:359
↓ 1 callers
Function
call_provider
(p: Provider, rng: random.Random)
phases/17-infrastructure-and-production/19-ai-gateways/code/main.py:35
↓ 1 callers
Function
call_raw_http
()
phases/00-setup-and-tooling/04-apis-and-keys/code/first_api_call.py:23
↓ 1 callers
Function
call_with_fallback
(prompt, preferred_model=None)
phases/11-llm-engineering/13-production-app/code/production_app.py:392
↓ 1 callers
Function
call_with_sdk
()
phases/00-setup-and-tooling/04-apis-and-keys/code/first_api_call.py:6
↓ 1 callers
Method
can
(self, action: str)
phases/19-capstone-projects/16-github-issue-to-pr-agent/code/main.py:83
↓ 1 callers
Function
canaryDemo
()
phases/17-infrastructure-and-production/20-shadow-canary-progressive/code/main.ts:302
↓ 1 callers
Function
canaryRollout
(reg: Regression)
phases/17-infrastructure-and-production/20-shadow-canary-progressive/code/main.ts:177
↓ 1 callers
Method
candidates
(signals: RouteSignals, policy: RoutePolicy)
phases/17-infrastructure-and-production/16-model-routing/code/main.ts:143
↓ 1 callers
Function
canonicalTraceId
(s: unknown)
phases/19-capstone-projects/11-llm-observability-dashboard/code/ts/src/spans.ts:7
↓ 1 callers
Method
capabilities
The .well-known/mcp-capabilities document.
phases/19-capstone-projects/13-mcp-server-with-registry/code/main.py:48
↓ 1 callers
Method
caption_logits
(self, memory: torch.Tensor, text_ids: torch.Tensor)
phases/19-capstone-projects/62-vision-language-pretraining/code/main.py:167
↓ 1 callers
Method
catalog
()
phases/14-agent-engineering/06-tool-use-and-function-calling/code/main.ts:149
↓ 1 callers
Method
catalog
(self)
phases/14-agent-engineering/06-tool-use-and-function-calling/code/main.py:116
↓ 1 callers
Function
categorical_pmf
(k, probs)
phases/01-math-foundations/06-probability-and-distributions/code/probability.py:26
↓ 1 callers
Function
categorize_failures
(session_spans: list[SpanEvent])
phases/14-agent-engineering/24-agent-observability-platforms/code/main.py:71
↓ 1 callers
Function
categorize_incident
(symptoms: dict)
phases/16-multi-agent-and-swarms/23-failure-modes-mast-groupthink/code/main.py:31
↓ 1 callers
Function
causal_mask
(n)
phases/07-transformers-deep-dive/07-gpt-causal-language-modeling/code/main.py:20
↓ 1 callers
Function
cce_gradient
(logits, target_index)
phases/03-deep-learning-core/05-loss-functions/code/main.py:56
↓ 1 callers
Function
ceiling
(target: Target, model_gb: float)
phases/17-infrastructure-and-production/12-edge-inference/code/main.py:34
↓ 1 callers
Function
cell
(r, c)
site/figures-math2.js:27
↓ 1 callers
Function
cer
(ref, hyp)
phases/06-speech-and-audio/17-audio-evaluation-metrics/code/main.py:39
↓ 1 callers
Function
cfg_sweep_demo
()
phases/04-computer-vision/11-stable-diffusion/code/main.py:27
↓ 1 callers
Method
cfp
(self, task: str, conv: str)
phases/16-multi-agent-and-swarms/02-fipa-acl-heritage/code/main.py:128
↓ 1 callers
Method
check
(self, user_id, tokens_needed, tier="free")
phases/11-llm-engineering/11-caching-cost/code/caching_cost.py:197
↓ 1 callers
Function
checkLength
(text: string, maxChars = 5000, maxWords = 1000)
phases/11-llm-engineering/12-guardrails/code/main.ts:153
↓ 1 callers
Function
checkRelevance
(input: string, output: string, threshold = 0.15)
phases/11-llm-engineering/12-guardrails/code/main.ts:223
↓ 1 callers
Function
checkSchema
(schema: ToolInputSchema, input: ToolInput)
phases/14-agent-engineering/18-agno-and-mastra-runtimes/code/main.ts:76
↓ 1 callers
Function
checkSystemPromptLeak
(output: string, systemPrompt: string, threshold = 0.4)
phases/11-llm-engineering/12-guardrails/code/main.ts:247
↓ 1 callers
Function
check_acceptance
(accept: list[str], feedback: list[dict])
phases/14-agent-engineering/42-agent-workbench-capstone/outputs/agent-workbench-pack/scripts/verify_agent.py:32
↓ 1 callers
Method
check_activations
(self)
phases/03-deep-learning-core/13-debugging-neural-networks/code/debug_neural_nets.py:70
↓ 1 callers
Function
check_code_main
(audit: Audit, lesson: Path)
scripts/audit_lessons.py:119
↓ 1 callers
Function
check_docs_en_md
(audit: Audit, lesson: Path)
scripts/audit_lessons.py:97
↓ 1 callers
Function
check_gates
(metrics: dict)
phases/17-infrastructure-and-production/20-shadow-canary-progressive/code/main.py:53
↓ 1 callers
Function
check_gpu
()
phases/00-setup-and-tooling/03-gpu-setup-and-cloud/code/gpu_check.py:5
↓ 1 callers
Function
check_gradient_health
(model)
phases/00-setup-and-tooling/12-debugging-and-profiling/code/debug_tools.py:85
↓ 1 callers
Method
check_gradients
(self)
phases/03-deep-learning-core/13-debugging-neural-networks/code/debug_neural_nets.py:87
↓ 1 callers
Function
check_independence
(joint, marginal_x, marginal_y, tol=1e-9)
phases/01-math-foundations/06-probability-and-distributions/code/probability.py:117
↓ 1 callers
Function
check_input_guardrails
(text)
phases/11-llm-engineering/13-production-app/code/production_app.py:284
↓ 1 callers
Function
check_internal_links
(audit: Audit, lesson: Path, text: str)
scripts/audit_lessons.py:196
↓ 1 callers
Function
check_length
(text, max_chars=5000, max_words=1000)
phases/11-llm-engineering/12-guardrails/code/guardrails.py:157
↓ 1 callers
Function
check_lesson
(lesson: Path, execute: bool)
scripts/lesson_run.py:141
↓ 1 callers
Function
check_lesson_dir_pattern
(audit: Audit, lesson: Path)
scripts/audit_lessons.py:85
↓ 1 callers
Method
check_loss_health
(self)
phases/03-deep-learning-core/13-debugging-neural-networks/code/debug_neural_nets.py:53
↓ 1 callers
Function
check_output_guardrails
(text)
phases/11-llm-engineering/13-production-app/code/production_app.py:310
↓ 1 callers
Function
check_quiz
(audit: Audit, lesson: Path)
scripts/audit_lessons.py:129
↓ 1 callers
Method
check_read
(self, turn: int, path: str)
phases/15-autonomous-systems/14-kill-switches-canaries/code/main.py:56
↓ 1 callers
Function
check_relevance
(input_text, output_text, threshold=0.15)
phases/11-llm-engineering/12-guardrails/code/guardrails.py:230
↓ 1 callers
Function
check_rules
(rule_report: list[dict])
phases/14-agent-engineering/42-agent-workbench-capstone/outputs/agent-workbench-pack/scripts/verify_agent.py:60
← previous
next →
2,901–3,000 of 8,347, ranked by callers