Skip to content

vk-09857/llm-engineering-practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LLM Engineering Practice

This repository contains practice of Large Language Models (LLMs), Prompt Engineering, LangChain, Retrieval-Augmented Generation (RAG), Vector Databases, FastAPI, GitHub APIs, Webhooks, Background Tasks, and Backend Development using Python.

Topics Covered

LLM Concepts

  • What are Large Language Models (LLMs)
  • Tokens and Tokenization
  • How LLMs generate responses

API Integration

  • API Calls
  • Environment Variables (.env)
  • Model Selection
  • Response Handling

Prompt Engineering

  • System Prompts
  • Assistant Roles
  • Temperature Control
  • Few-Shot Prompting
  • Structured JSON Output
  • Prompt Design Best Practices

Token Management

  • Token Usage Monitoring
  • Prompt Tokens
  • Completion Tokens
  • Cost Awareness

LangChain Fundamentals

  • ChatGroq
  • PromptTemplate
  • ChatPromptTemplate
  • StrOutputParser
  • Chains
  • LCEL (LangChain Expression Language)
  • invoke()
  • batch()
  • stream()

Memory Concepts

RAG Basics

  • Document Loaders
  • LangChain Documents
  • page_content and metadata
  • Text Chunking
  • chunk_size
  • chunk_overlap
  • RecursiveCharacterTextSplitter

Embeddings

  • Embedding Vectors
  • Cosine Similarity
  • Semantic Search
  • Similarity Search
  • HuggingFace Embeddings
  • Sentence Transformer Embeddings

ChromaDB

  • Vector Stores
  • Similarity Search
  • Retrievers
  • Retrieval Process
  • Collections
  • PersistentClient
  • Collection Management
  • Vector Persistence
  • add()
  • query()
  • update()
  • Unique Document IDs
  • Metadata Storage
  • Metadata Retrieval

Complete RAG Pipeline

  • Document → Chunking → Embeddings
  • Embeddings → Vector Database
  • Retrieved Context → LLM
  • Context Injection
  • Question Answering using RAG
  • Interactive RAG Chatbot
  • Retriever + LLM Pipeline
  • Conversational Question Answering

FastAPI & Backend Development

  • FastAPI Basics
  • CRUD APIs
  • Pydantic Schemas
  • Request & Response Handling
  • JWT Authentication
  • Password Hashing
  • SQLite
  • PostgreSQL
  • SQLAlchemy ORM
  • Database Models
  • Query Operations
  • REST APIs

GitHub REST API

  • Personal Access Tokens
  • Authentication Headers
  • Repository API
  • Pull Request API
  • Contributor Analytics
  • JSON Response Handling

GitHub Webhooks

  • Webhook Events
  • Push Events
  • Pull Request Events
  • Event Payloads
  • Event Headers
  • ngrok Integration
  • Real-Time Event Processing

Background Tasks

  • FastAPI BackgroundTasks
  • add_task()
  • Asynchronous Processing
  • Webhook Event Processing
  • Event Logging

Event Storage & Analytics

  • SQLite Event Database
  • SQLAlchemy Models
  • Database Sessions
  • Event Storage
  • Analytics APIs

Project Structure

AI-ENGINEERING/
│
├── groq-api/
│   ├── 01_api_call.py
│   ├── 02_system_prompt.py
│   ├── 03_assistant_role.py
│   ├── 04_temperature.py
│   ├── 05_json_output.py
│   ├── 06_few_shot_prompting.py
│   ├── 07_token_usage.py
│   ├── notes.md
│   └── requirements.txt
│
├── langchain-basics/
│   ├── 01_langchain.py
│   ├── 02_prompt_template.py
│   ├── 03_output_parser.py
│   ├── 04_chain.py
│   ├── 05_chat_prompt_template.py
│   ├── 06_batch.py
│   ├── 07_stream.py
│   └── notes.md
│
├── rag-basics/
│   ├── chroma_db/
│   ├── .env
│   ├── 01_document_loader.py
│   ├── 02_text_splitter.py
│   ├── 03_embeddings.py
│   ├── 04_similarity.py
│   ├── 05_chromadb.py
│   ├── 06_chromadb_search.py
│   ├── 07_retriever.py
│   ├── 08_rag_pipeline.py
│   ├── 09_rag_chatbot.py
│   ├── app.py
│   ├── notes.md
│   ├── notes.pdf
│   ├── notes.txt
│   ├── rag_chunks.py
│   └── requirements.txt
│
├── vector-db-practice/
│   ├── chroma_db/
│   ├── 01_document_loader.py
│   ├── 02_text_splitter.py
│   ├── 03_embeddings.py
│   ├── 04_chromadb.py
│   ├── 05_similarity_search.py
│   ├── 06_metadata_store.py
│   ├── 07_retriever.py
│   ├── 08_rag_pipeline.py
│   ├── 09_rag_chatbot.py
│   ├── app.py
│   ├── chunking.py
│   ├── notes.pdf
│   ├── persistent_db.py
│   └── requirements.txt
│
├── github-api/
│   ├── 01_repo_info_fetcher.py
│   ├── 02_pr_tracker.py
│   ├── 03_contributor_analytics.py
│   ├── 04_webhook_practice.py
│   ├── 05_background_tasks.py
│   ├── 06_webhook_background_task.py
│   ├── 07_event_logger.py
│   ├── 08_event_database.py
│   ├── 09_webhook_database.py
│   ├── 10_analytics_api.py
│   ├── database.py
│   ├── models.py
│   ├── requirements.txt
│   └── README.md
│
└── README.md

Technologies Used

  • Python
  • Groq API
  • Llama Models
  • LangChain
  • ChromaDB
  • Vector Databases
  • Sentence Transformers
  • HuggingFace Embeddings
  • Prompt Engineering
  • RAG Concepts
  • Semantic Search
  • Similarity Search
  • Vector Embeddings
  • Retrieval Systems
  • LangChain Retrievers
  • FastAPI
  • SQLAlchemy
  • SQLite
  • PostgreSQL
  • Redis
  • Celery
  • GitHub REST API
  • GitHub Webhooks
  • Background Tasks
  • ngrok
  • Environment Variables
  • Git & GitHub

About

LLM Engineering practice with Groq API, prompt engineering, LangChain, RAG, Embeddings, ChromaDB, FastAPI, GitHub REST APIs, GitHub Webhooks, Background Tasks, SQLite, SQLAlchemy, and modern AI application development using Python.

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages