Explain AI Library

Welcome to the Explain AI library documentation.

Usage

To use the Explain AI library, include the following script tag in the <head> section of your HTML file:

<script async src="https://lib.xplnai.com/build/xpln.js"></script>

Important Note on Security

Since this library uses an iframe and injects styles, you must adjust your Content Security Policy (CSP) and other relevant security settings. Specifically:

Please adjust your Content Security Policy (CSP) to include the following directives:

Your complete Content Security Policy should look similar to this:

Content-Security-Policy = """
        script-src 'self' 'unsafe-inline' https://xplnai.com;
        style-src 'self' 'unsafe-inline' https://xplnai.com https://fonts.googleapis.com;
        frame-src 'self' https://xplnai.com;
        connect-src 'self' https://*.xplnai.com;
        font-src 'self' https://fonts.gstatic.com;
      """

Failure to adjust these settings may result in the library not functioning correctly due to security restrictions.

Example Usage

To see how Explain AI works, try highlighting any part of the following text:

The concept of epistemology in philosophy deals with the nature, sources, and limits of knowledge. It asks fundamental questions about how we acquire information and what constitutes justified belief versus mere opinion. Philosophers have long debated whether our understanding of reality is based on empirical evidence, rational thought, or a combination of both. This inquiry into the foundations of knowledge has significant implications for fields ranging from science to ethics, influencing how we approach truth, certainty, and the validation of claims across various disciplines.

One particularly intriguing aspect of epistemology is the problem of skepticism, which challenges our ability to know anything with absolute certainty. Skeptics argue that our senses and reasoning capabilities may be fundamentally flawed or deceived, leading to the unsettling possibility that what we perceive as reality could be an illusion. This philosophical conundrum has inspired countless thought experiments, such as Descartes' "evil demon" hypothesis and the modern "brain in a vat" scenario, pushing us to question the very nature of our existence and the reliability of our cognitive faculties.

Powered by
Explain AI