วันอังคารที่ 24 กุมภาพันธ์ พ.ศ. 2569

Pyvis

 A framework for Interactive network visualization

LLM temperature

LLM temperature is a hyperparameter (typically 0 to 2) that controls the randomness and creativity of an AI's output by adjusting the probability distribution of predicted tokens. Lower temperatures (0-0.3) produce deterministic, focused, and factual results, while higher temperatures (>0.8) create more diverse, random, or "creative" text.


https://dagshub.com/glossary/llm-temperature/


The following article shows how to use Bash script to interact with Ollama

https://www.inferable.ai/blog/posts/model-temperature-first-principles


Zero Temperature (0.0): Makes the model completely deterministic. It will always choose the token (word or syllable) with the absolute highest probability at that exact step.

While setting the temperature to $0$ forces the model to choose its "best guess" every single time, the model's best guess can still be completely wrong.

How Hallucinations Are Actually Mitigated

Because temperature is just a decoding hyperparameter, engineers and researchers use structural architectural patterns to combat hallucinations:

  • Retrieval-Augmented Generation (RAG): Grounding the model by supplying it with verified, external documents to reference before it generates an answer.

  • Fine-Tuning & Reinforcement Learning from Human Feedback (RLHF): Training the model specifically to say "I don't know" when it lacks data, rather than guessing.

    RLHF: Human evaluators rank llm answers from best to worst based on quality, accuracy, and safety.

  • System Prompt Constraints: Explicitly instructing the model (e.g., "If you do not find the answer in the provided context, state that you do not know.").

If you are working on a system where factual accuracy is paramount, keeping the temperature low (around 0.0 to 0.2) is a great baseline practice—just don't mistake determinism for truth.

Tech stack

A tech stack (technology stack) is the combination of programming languages, frameworks, libraries, databases, front-end tools, back-end tools, and APIs used to build and run a software application. It acts as the "solution stack" or, foundation, organizing tools into layers—client-side (front-end) and server-side (back-end)—that work together to create a functional, scalable application.

Key Components of a Tech Stack:
  • Front-End (Client-Side): What users interact with, including HTML, CSS, JavaScript, and frameworks like React (for building web app with JavaScript), React Native (for building Mobile app) or Angular.
  • Back-End (Server-Side):
     The "under the hood" logic, including programming languages like Python, Java, or Node.js, Docker, and frameworks like 
    Django
     or 
    Express
    .
  • Database: Where data is stored, such as MySQL, PostgreSQL, or MongoDB.
Popular Examples: LAMP: Linux, Apache, MySQL, PHP/Python/Perl.

IDE: Android Studio, Xcode, VScode

UX/UI Design: Figma

วันศุกร์ที่ 20 กุมภาพันธ์ พ.ศ. 2569

Backtracking

Backtracking is a class of algorithms for finding solutions to some computational problems, notably constraint satisfaction or enumeration problems, that incrementally builds candidates to the solutions, and abandons a candidate ("backtracks") as soon as it determines that the candidate cannot possibly be completed to a valid solution.

Example is Maze Solving (เขาวงกต): Moving through a maze and turning back when you hit a wall to try the other fork in the road.

Backtracking is implemented by means of recursion.

Poisson distribution (& Binomial distribution & Gaussian distribution)

Poisson distribution expresses the probability of a given number of events of the same type (e.g., counting the number of emails received between 9:00 AM and 10:00 AM. (one event type: emails)) occurring in a fixed interval of time if these events occur with a known constant mean rate and independently of the time since the last event.
































Poisson distribution vs Binomial distribution

















Gaussian distribution is aka Normal distribution often used to examine students' scores















--Gemini & Wikipedia

วันพุธที่ 18 กุมภาพันธ์ พ.ศ. 2569

วันศุกร์ที่ 6 กุมภาพันธ์ พ.ศ. 2569

Literature review

 ที่ม สุรนารี ใช้คำภาษาไทยว่า ปริทัศน์วรรณกรรม

วันพฤหัสบดีที่ 5 กุมภาพันธ์ พ.ศ. 2569

วันอังคารที่ 3 กุมภาพันธ์ พ.ศ. 2569

AI for creating VR world

https://labs.google/projectgenie

https://www.youtube.com/watch?v=YxkGdX4WIBE

วันพฤหัสบดีที่ 29 มกราคม พ.ศ. 2569

UML creation scripting (similar to LaTex)

  • https://plantuml.com/
  • plantuml in VS' marketplace : https://marketplace.visualstudio.com/items?itemName=jebbs.plantuml
  • try the following code in this editor https://editor.plantuml.com

@startuml

Alice -> Bob : hello

@enduml

วันอาทิตย์ที่ 25 มกราคม พ.ศ. 2569

Multilingual AI detector (not free)

https://app.originality.ai/home/scan 

It supports Thai language.

วันเสาร์ที่ 24 มกราคม พ.ศ. 2569

Call number codes

 


วันอังคารที่ 20 มกราคม พ.ศ. 2569

Superlinear, Linear, Sublinear

Superlinear คือ slop เพิ่มขึ้นเรื่อยๆ (โตเร็วกว่า linear)

Sublinear คือ slope ลดลงเรือยๆ (โตช้ากว่า linear)

Example:



วันพุธที่ 14 มกราคม พ.ศ. 2569

Settrade streaming pro

 



วันพฤหัสบดีที่ 18 ธันวาคม พ.ศ. 2568

Speech recognition model by OpenAI

Whisper is a general-purpose speech recognition model. It is trained on a large dataset of diverse audio and is also a multitasking model that can perform multilingual speech recognition, speech translation, and language identification.

https://github.com/openai/whisper

วันเสาร์ที่ 6 ธันวาคม พ.ศ. 2568

Major types of recommendation systems

Collaborative Filtering (finding similar users/items based on past behavior), Content-Based Filtering (recommending items with similar features to what a user liked), and Hybrid Systems (combining both for better results). Other advanced types include Knowledge-Based, Deep Learning, and Demographic systems, which leverage different data points like item attributes, complex patterns, or user demographics to provide personalized suggestions. 

Collaborative Filtering (CF):
  • Concept: "People who liked X also liked Y." It finds patterns in user-item interactions (ratings, purchases).
  • Sub-types: User-based (If User A buys Item A, and a neighboring User B (who is found to be highly similar to User A based on their shared past interactions like rating or purchases) also buy Item B but User A has not yet bought it, then the system should recommend Item B to User A.) and Item-based (If a user likes item A, and many users who liked item A also liked item B, then the system should recommend item B to that user.).
  • Techniques: Matrix Factorization (like SVD), Nearest Neighbors.
Content-Based Filtering:
    • Concept: Recommends items similar to those a user has liked before, based on item features (e.g., movie genre, director, actors). If a user liked item A, they will also like item B if item B shares many of the same features as item A.
    • How it works: Builds a user profile from features of liked items, then matches it to other items based on similarity. The features can also include those of the user like age and gender.
Hybrid Recommendation Systems:
  • Concept: Merges CF and Content-Based methods, or other techniques, to overcome individual limitations (like the cold-start problem). 
--Gemini

LightFM is a Python implementation of a number of popular recommendation algorithms for both implicit and explicit feedback.
LightFM can solve cold-start problem: For a new user (cold-start user), LightFM uses their provided features (e.g., "age: 25, gender: female") to do content-based filtering to recommend items that share similar features with the user's profile. As the cold-start user interacts with items, the model gradually updates their information, shifting from pure content-based to a more personalized collaborative prediction.

วันพุธที่ 3 ธันวาคม พ.ศ. 2568