วันพุธที่ 10 มิถุนายน พ.ศ. 2569

Rising of Quantum computing

“Why is quantum computing becoming feasible now after being proposed decades ago?”

The idea is old

The foundations of quantum computing were developed in the 1980s and 1990s by researchers such as Richard Feynman, David Deutsch, and Peter Shor.

Important milestones:

  • 1981: Feynman proposed simulating quantum systems with quantum machines.
  • 1994: Shor discovered an algorithm that could factor large numbers exponentially faster than known classical methods.
  • 1996: Grover introduced a quantum search algorithm.

These discoveries generated enormous excitement.

Why didn’t it take off immediately?

Because building a quantum computer is extraordinarily difficult.

A classical bit is either:

  • 0
  • 1

A quantum bit (qubit) can exist in a quantum state involving both possibilities simultaneously.

The problem is that qubits are extremely fragile:

  • Heat destroys quantum states.
  • Electromagnetic noise causes errors.
  • Vibrations cause decoherence.
  • Measurement collapses the state.

For decades, researchers knew the theory but could not build machines large enough to be useful.

What changed recently?

1. Better hardware engineering

Researchers learned how to manufacture and control:

  • Superconducting qubits
  • Trapped-ion qubits
  • Neutral-atom qubits
  • Photonic qubits

Companies such as  IBM Quantum⁠,  Google Quantum AI⁠,  IonQ⁠, and  Quantinuum⁠ have demonstrated increasingly larger and more reliable quantum processors.

2. Advances in error correction

A practical quantum computer may require thousands or even millions of physical qubits to create a much smaller number of reliable logical qubits.

For many years, error correction was mostly theoretical. Recently, experimental demonstrations have shown that logical qubits can become more reliable as more physical qubits are added, an important milestone.

3. Improved cryogenic and control systems

Many quantum computers operate near absolute zero:

  • Room temperature ≈ 300 K
  • Quantum processors ≈ 0.01 K

Advances in refrigeration, microwave electronics, and precision control have made experiments possible at larger scales.

4. Significant investment

Governments and industry have invested billions of dollars because quantum computing could potentially impact:

  • Cryptography
  • Materials science
  • Drug discovery
  • Optimization
  • Quantum chemistry

Why isn’t quantum computing as popular as AI?

Because quantum computing still lacks a “ChatGPT moment.”

AI became popular when ordinary people could immediately see value:

  • Writing text
  • Generating images
  • Coding assistance
  • Translation

Quantum computers currently:

  • Are expensive.
  • Have limited numbers of high-quality qubits.
  • Remain primarily research tools.
  • Solve only a narrow range of problems better than classical computers.

Most people cannot yet use a quantum computer to improve their daily work.

A useful analogy

If AI in 2026 is like the internet around 2010—already transforming daily life—then quantum computing is more like the internet around 1975:

  • The underlying science is real.
  • Experts know it is important.
  • Significant prototypes exist.
  • Commercial potential is visible.
  • But widespread practical use is still emerging.

Quantum computing may eventually become revolutionary, but unlike AI, it has not yet reached the stage where the average person can benefit from it directly.

—ChatGPT

Rise of uncle AI

 AI has existed for decades, but several key factors only came together in the last 10–15 years, making it practical and widely accessible.

1. Massive amounts of data

Early AI systems had limited training data. Today, the internet, social media, digital documents, videos, sensors, and smartphones generate enormous datasets that AI can learn from.

For example:

  • In the 1980s, a researcher might have thousands of examples.
  • Today, AI models can be trained on billions or trillions of words and images.

2. Powerful computing hardware

Modern AI, especially deep learning, requires huge computational power.

The rise of:

  • Graphics Processing Units (GPUs)
  • Cloud computing
  • Specialized AI chips

made it possible to train models that would have taken centuries on older computers.

3. Breakthroughs in algorithms

Many AI ideas are not new. Neural networks were proposed in the 1940s–1980s.

However, researchers discovered better:

  • Network architectures
  • Training techniques
  • Optimization algorithms
  • Attention mechanisms and Transformers

The publication of the Transformer architecture in 2017, described in the paper “Attention Is All You Need”, was particularly important because it enabled large language models such as ChatGPT.

4. Cloud infrastructure

In the past, using AI required expensive local hardware and expert knowledge.

Today, companies can provide AI through cloud services:

  • OpenAI⁠
  • Google Cloud AI⁠
  • Microsoft Azure AI⁠
  • Amazon Web Services AI⁠

This dramatically lowered the barrier to adoption.

5. Consumer-facing applications

AI was often hidden inside specialized systems:

  • Expert systems
  • Industrial optimization
  • Fraud detection
  • Search engines

Most people never interacted with it directly.

Today, users can simply chat with AI, generate images, summarize documents, or write code. ChatGPT made AI visible to the general public in the same way that the web browser made the internet visible in the 1990s.

6. Economic incentives

Companies discovered that AI could:

  • Reduce labor costs
  • Improve productivity
  • Personalize services
  • Automate decision-making

This triggered massive investment from governments, startups, and large technology firms.

Why not 20 years ago?

A useful way to think about it is:

The theory of AI arrived first, the data arrived second, the hardware arrived third, and the killer applications arrived last.

Many core AI concepts were invented decades ago, but until recently there was not enough data, computing power, or infrastructure to make them useful at large scale.

A historical analogy is aviation:

  • The idea of flying existed for centuries.
  • The physics were understood.
  • But practical flight only became common when engines, materials, manufacturing, and infrastructure matured simultaneously.

AI followed a similar path. The concepts were old, but only recently did the necessary ecosystem become mature enough for widespread adoption.

—ChatGPT

วันอังคารที่ 9 มิถุนายน พ.ศ. 2569

วันจันทร์ที่ 8 มิถุนายน พ.ศ. 2569

เครื่องมือที่ภาคสถิตินิยมใช้

เรียงจากเก่าไปใหม่
  1. https://www.sas.com/en_th/home.html
  2. R
  3. Python

วันอาทิตย์ที่ 7 มิถุนายน พ.ศ. 2569

Explainable AI (XAI)

That is the core philosophy of Explainable AI (XAI).

In traditional machine learning, we often trade interpretability for accuracy. High-performing models like deep neural networks, ensemble trees (XGBoost, Random Forest), and Large Language Models operate as black boxes. They take an input and produce an output, but the internal mathematical routing—millions or billions of parameters interacting simultaneously—is too complex for a human to track or understand.

XAI bridges this gap by introducing tools and methodologies to peer inside or approximate that logic, effectively trying to turn those opaque systems into white boxes (or at least "gray boxes").

Here is a breakdown of how XAI attempts this transformation and where the boundaries lie.

1. Two Main Approaches to "Whiteness"

XAI generally tackles the black box problem in one of two ways:

A. Intrinsic Interpretability (Designing White Boxes From the Start)

Instead of building a massive black box and trying to explain it later, this approach uses models that are inherently transparent. Humans can directly look at the model's structure and understand its logic.

  • Linear/Logistic Regression: You can see the exact weight ($w_i$) assigned to each feature.

  • Decision Trees (Shallow): You can follow the exact if-then-else paths.

  • Generalized Additive Models (GAMs): They capture non-linear relationships but keep the impact of each variable isolated and readable.

B. Post-Hoc Explanation (Explaining the Black Box)

When you must use a complex model (like a deep neural network for computer vision) for its high accuracy, post-hoc XAI methods are applied after training to reverse-engineer or approximate how it made a decision.

  • Model-Agnostic Methods: Tools like LIME (Local Interpretable Model-agnostic Explanations) and SHAP (SHapley Additive exPlanations). They perturb the input data and observe how the output changes to calculate feature importance for a specific prediction.

  • Pixel Attribution / Saliency Maps: For image models, methods like Grad-CAM highlight the exact pixels or regions the neural network focused on when classifying an image (e.g., highlighting the ears and whiskers to classify a "cat").

2. The Core Challenge: The Trade-off

While XAI tries to make models white-box, a fundamental tension exists: The Fidelity vs. Interpretability Trade-off.

High Complexity <==> High Accuracy <==> Low Interpretability

If a post-hoc explanation is too simple, it fails to capture the true, complex logic of the black box (low fidelity). If the explanation is too complex, it ceases to be understandable to humans, defeating the purpose of being a white box.

Because of this, post-hoc XAI rarely turns a black box into a perfect white box; instead, it usually provides a highly accurate local map or a simplified global summary.

3. Why This Transformation Matters

Shifting from black box to white box isn't just an academic exercise. It is a critical requirement in high-stakes domains:

  • Trust and Safety: In healthcare, a doctor needs to know why an AI diagnosed a patient with a specific condition before prescribing a high-risk treatment.

  • Debugging and Optimization: If a model fails or exhibits bias, a white-box view allows data scientists to pinpoint exactly which features or neurons caused the failure.

  • Regulatory Compliance: Frameworks like the EU's GDPR guarantee citizens a "right to explanation" when automated decisions impact them (e.g., loan denials or employment screening).

วันศุกร์ที่ 5 มิถุนายน พ.ศ. 2569

วันพฤหัสบดีที่ 4 มิถุนายน พ.ศ. 2569

Good LLM Prompt Structure

"RCTCFEC"

1. Role / Persona

Establish who the AI should act as to give it the right mindset and tone. 
  • Example: "You are an expert digital marketer..."
2. Context
Provide background information, the target audience, and the current situation. 
  • Example: "...launching a new SaaS tool aimed at freelance designers. My audience struggles with client interruptions." 
3. Task
Clearly state exactly what you want the AI to do. 
  • Example: "Write a 400-word LinkedIn post promoting the launch."
4. Constraints
Set the boundaries, rules, or things the AI must avoid to keep it on track. 
  • Example: "Keep the tone encouraging, avoid overly technical jargon, and don't make the reader feel guilty."
5. Format & Output Requirements
Specify how the final answer should look or be organized (e.g., word count, bullet points, or structure). 
  • Example: "Structure it with a catchy hook in the first paragraph, three main bullet points for benefits, and a clear call-to-action."
6. Examples (Optional but highly recommended)
Provide one or two examples of input and ideal output so the AI can mimic the exact style you want.
7.Cross-source synthesis (กรณีใช้ RAG เช่น upload file เพิ่มเข้าไปให้วิเคราะห์)
Compare your results with my uploaded document to ensure that ...(our strength aligns with market's demand)