From Text to Trait: An AI Tool for Identifying Intellectual Humility

My B.Tech thesis developing an LLM-based tool to analyze narratives for complex psychological traits, grounded in the philosophical wisdom of the Upanishads.

Role:Researcher & ML Engineer
Institution:CoE-IKS, IIT Kharagpur
Tech Stack:
Google Gemini Pro
Few-Shot Learning
Prompt Engineering
Streamlit
Hugging Face Spaces
The title page of the B.Tech thesis report.

1. The Research Challenge: Bridging Ancient Wisdom and Modern AI

Intellectual Humility (IH) is a complex psychological virtue. While modern frameworks exist, there's a significant gap in applying AI to analyze IH traits derived from ancient Indian wisdom. My research, conducted at the Centre of Excellence for Indian Knowledge Systems (CoE-IKS), aimed to bridge this gap. The goal was to build an LLM-based tool capable of identifying 30 distinct IH traits based on the foundational framework developed by Dr. Jayashree Gajjam (2024).

A list of the 30 Intellectual Humility traits used as the foundation for the project.
The 30-trait Intellectual Humility framework that formed the basis of the model.

2. Methodology: From Zero-Shot Failure to Few-Shot Success

My initial approach using zero-shot learning with Google Gemini Pro was unsuccessful. The model identified generic positive traits but consistently failed to capture the specific, nuanced definitions required by the Upanishadic IH framework.

An example showing the poor, generic output from a zero-shot learning approach.
A detailed analysis of the crucial traits missed by the zero-shot model.

The carousel shows the initial generic output and an analysis of the key traits it missed.

This critical failure led me to pivot to a few-shot learning strategy. I meticulously curated a small, high-quality dataset of 12 annotated Upanishadic stories. By providing the LLM with these examples within a highly engineered prompt, I was able to effectively guide it to understand and apply the specific IH framework, leading to far more accurate and relevant analysis.

3. The Outcome: A Deployed & Validated Tool

The final result is a functional, publicly accessible tool deployed on Hugging Face Spaces using Streamlit. It can analyze any story for Intellectual Humility traits and provides a "chain-of-thought" explanation for each identified trait, making the AI's reasoning transparent.

A screenshot of the final Streamlit application deployed on Hugging Face Spaces.

Validation on Unseen & Cross-Lingual Texts

To validate the model's robustness, I tested it on diverse, unseen narratives. The tool successfully identified relevant IH traits in a biographical story about Dr. A.P.J. Abdul Kalam and, more surprisingly, was able to analyze a poem in Telugu—a language it was not trained on—and provide a correct analysis in English.

An example showing the model analyzing a story about Dr. APJ Abdul Kalam.
An example showing the model analyzing a Telugu poem and providing correct English output.

Key References

This work stands on the shoulders of existing research. The following were central to the project's foundation:

  • Gajjam, Jayashree Aanand. “The Upaniṣadic Way of Intellectual Humility.” Brahmavidya, The Adyar Library Bulletin, vol. 88, 2024, pp. 127–192.
  • Wei, Jason, et al. “Chain-of-thought prompting elicits reasoning in large language models.” Advances in neural information processing systems, vol. 35, 2022, pp. 24824-24837. [Link]
  • WHITCOMB, DENNIS, et al. “Intellectual Humility: Owning Our Limitations.” Philosophy and Phenomenological Research, vol. 94, no. 3, 2017, pp. 509–39. [Link]