Crimson Reason

A site devoted mostly to everything related to Information Technology under the sun - among other things.

Monday, March 17, 2025

Flaws in Smartphone Face-recognition Software [Tech News]

From British consumer magazine WHICH

The problem with face-recognition: apparently, with some smartphones, holding an ordinary photograph up to the phone can unlock it, if I understand correctly. I suppose this means that the person stealing your mobile phone from you knows you, as they would need to have the photo in the first place. 

I have avoided activating the face-recognition functionality on my smartphone (which is a basic Samsung) because I was wondering what you do if it doesn't work: the software has not been updated, or the place where you are is too dark and the phone cannot 'see' you, and so on. 

The Extract below. The article may be behind a pay wall. 

____________________________

In 2023, we revealed that over 40% of phones we tested had face recognition security that could be easily fooled and successfully unlocked by a 2D printed photograph. These included popular handsets from Samsung, Motorola, Xiaomi and others. Unfortunately the issue isn't going away and we were surprised that the same issue affects two phones in the Samsung Galaxy S24 series, and all phones in the S25 series. 

Fortunately, Samsung offers a clear warning during the face recognition set up that tells users the system can be fooled with a photograph. But to avoid this vulnerability, we recommend you don't enable the feature and use the fingerprint sensor or a password/PIN instead. Long PINS are generally more secure (six characters), and if you can set up a password, use a mixture of different characters so it's harder to guess. We recommend setting up protections on your apps that contain sensitive information too – this could involve logging out when you're not using them, or setting up passwords or fingerprint locks.

We approached Samsung for comment on our findings about face recognition on the Samsung Galaxy S24 and Galaxy S24+ in 2024. It said: 'We provide various levels of biometric authentication, with the highest level of authentication from the fingerprint reader. In addition, we provide users with multiple options to unlock their smartphones through both biometric security methods, and convenient options such as swipe or facial recognition. Further information about facial recognition can be found via the settings on Samsung Galaxy smartphones.'

https://www.which.co.uk/news/article/great-alternatives-to-the-samsung-galaxy-s25-that-can-save-you-money-alJca9h6J0C1?utm_source=ExactTarget&utm_medium=Email&utm_campaign=4564291-C_WS_EM_PROD_C__20250228&mi_u=220092277&mi_ecmp=C_WS_EM_PROD_C__20250228

Monday, March 10, 2025

Conflict & Reconciliation Feature for Social Networks - A Proposal

 Subject Matter & Problem

In the course of interactions among human beings, there arises, perhaps inadvertently and perhaps otherwise, that one or more parties take offense or are made angry by the utterances or behavior of another party or parties.  Human societies, historically, have developed mechanism to cope with social friction among the members, limit its negative consequences, and to facilitate reconciliation among the affected parties.

Virtual communities and social networks such as Facebook, Google Groups, etc. are novel ways of human interactions and group formation which are based on computer and information technologies.  However, they are not immune to the occurrences of social friction among their members and the attendant issues of anger management and reconciliation among “warring” parties.  Facebook, for example, offers a binary choice between a “Friend” and “Un-Friend”; one may “Un-Friend” a “Friend” if one has been angered – or otherwise disappointed – by that person.   There is no intermediate state between a “Friend” and “Un-Friend” which could distinguish among total strangers in contradistinction to former friends and acquaintances who could, when one’s anger cools, become one’s friends again.

Solution

The gist of this solution is to endow the social networking sites and virtual communities with a feature to mediate and affect a reconciliation among former friends and acquaintances beyond the binary choice of “Friend” and “Un-Friend” and to further facilitate the resolution of the conflict through selected “Intercessors”.

Use Case 1 – Normal Use

  • The user navigates to a screen that contains a list of his contacts.
  • He selects one or more of them and designates them as: “Not on Speaking Terms”, or “Sulking”, or “Furious” or some such phrase (or its equivalent in other languages).  That is, he sets their “Conflict” status.
  • The system updates their profiles accordingly.
  • The system displays the text above and an appropriate icon that indicates that these individuals have been thus designated as being in “Conflict” with this or that user.

This will be visible to all.

This designation is not conceived to be equivalent to “Un-Friend”.

  • The user could further designate a time period for that status: from “Never Expires” to a date and time range (either selectable from a screen widget or entered manually by the user).
  • The user may optionally decide if he wants to block communication from the “Conflict” contacts.
  • The system will notify those contacts of a change in their status.

That communication could be in the form of email, internal communication, text messages, phone calls etc. – together with an appropriate text message.

  • The system will notify others who share the affected contacts with the user and are also in the user’s social network of the “conflict” status change above.
  • When the “Conflict” status time interval expires, the system reverts the status to “Friend”.

 Use Case 2 – User Selected Intercessor Option

  • The user could further designate one or more “Intercessors” for each and any of the affected contacts from among their common contacts.
  • The role of “Intercessor”, should they accept it, would be to try to mediate and resolve the conflict among the affected parties within the stated period of the conflict.
  • This is an option that the user may or may not exercise.
  • The system will query the “Intercessors” through a possible multiplicity of communication channels if they consent to play that role (for conflict resolution and mediation).
  • If the “Intercessor” agrees, the system will notify the user who had initially requested the help of the “Intercessor” as well as the affected “Conflict” contacts.

4.       It is up to the “Intercessor” then to initiate the process of reconciliation.

Use case 3 – User elects to be “Intercessors”

Optionally, any user may elect to be an available as an “Intercessor” in a social network or virtual community.

Use case 4 – System Recommends “Intercessors”

Optionally, the system recommends a list of available “Intercessors” to the user.

Use case 5 – “Conflict” contact looks for an “Intercessors”

Optionally, the system recommends a list of available “Intercessors” to a “Conflict” contact after the system has informed him of the change in his “Conflict” status by another user.

Description

This is envisioned as a software add-on to existing as well as new social networking sites and virtual communities.  The operation of the invention is described in the above use cases.

Advantages

The chief advantage of this invention is that it enables one to retain one's "Friends" in social network even when one is cross with them. To wit, one announces publicly that he is cross with this or that person, others take note of it, and depending on the desire of both sides and their own inclinations could help them reconcile. So one does not necessarily wind up losing one's friend in a network due to a temporary emotional outburst or state of anger.

System Architecture & Design

The architecturally significant components of the system are illustrated below:

 


Possible Modifications

Something analogous to this may be incorporated into email clients – a “conflict” icon or button in which enables a user to designate one or some of his/her contacts as “In Conflict” until further notice.  The email server can then alert the person so designated of the change in his/her status by another user.  Optionally, all members of a person’s social network could be advised of the status.  Furthermore, the email client can expire the status and revert it back to “Friend” at a designated date and time (by the user).  Likewise, the email client or the email server could, for the duration, junk or otherwise archive email messages from such users.

 This invention could be extended to text messaging systems as well and with a suitable emoji.

 

Sunday, March 2, 2025

Automated Exploration of Knowledge with Large Language Models, Concept Extraction, and Cyc - A Proposal

In a previous post, I outlined how LLMs, Concept Extraction tools, and CYC could be combined to create a more structured, semantically rich representation of the generated text.  

In this post, I would like to build on that proposal and outline a way to automatically query LLMs based on their initial text in response to a user's question.

The process is as follows:

Overview of Steps:

  1. User poses a question to LLM 
  2. LLM Generates Text
  3. Concept Extraction is applied to LLM Text
  4. CYC uses to those extracted concepts to find related concepts (please see below)
  5. Questions are created from those related concepts
  6. Those questions are posed to the LLM & Summarized
I have already discussed the substance of steps 1 to 3 in my previous post.  Here I am going to outline steps 4 & 5.

Step 4:

The application of Concept Extraction tools to the LLM Text output results in a set of concepts.  To generate more concepts starting from a set of initial concepts and navigate to their "nearest" or related concepts, you can follow these steps using Cyc's knowledge base. The goal is to explore the relationships between concepts and expand the collection by finding the most connected or related concepts to each starting concept.

Overview of Steps:

  1. Start with a collection of initial concepts.
  2. For each concept, find its nearest related concepts based on the relationships in the Cyc knowledge base (e.g., “isa,” “part-of,” “related-to”).
  3. Navigate to these related concepts, recursively, if necessary, to explore further connections.
  4. Generate new concepts by expanding from the nearest neighbors.
  5. Visualization or Compilation

Key Queries in CycL for Navigating Concepts:

  • Isa (Is-A) Relationships: This tells you what class a concept belongs to. It’s often used to explore a concept’s category.
  • Part-Of: This is useful to find what parts or components a concept belongs to.
  • Related-To: This can be used to find other concepts that are semantically related to a given concept.
  • Sub-collection: This allows you to find all instances of a specific concept.

Example: Navigation from Concepts

Let's say you have a collection of starting concepts, such as Cow, Milk, and Farm.

You can navigate the relationships by querying Cyc for the nearest concepts based on different relationships. We’ll perform a step-by-step expansion for each of these concepts, showing how to retrieve the "nearest" related concepts.

Step A: Start with a Collection of Concepts

Let’s say you have the following concepts to begin with:

  • Cow
  • Milk
  • Farm

These are the seed concepts from which you want to expand.

Step B: Define Queries to Explore Nearest Concepts

Now, you can create queries for each starting concept to find the nearest related concepts. Here’s how you can perform some basic queries in CycL for this task.

Query 1: Find the "Is-A" (Classification) Relationships

This query identifies what category the concept belongs to. For example, for Cow, you can check for its broader classification.

(isa Cow ?X)

This asks, “What categories does Cow belong to?” and will return categories such as Mammal, DomesticAnimal, etc.

Query 2: Find "Related-To" Concepts

Next, you can explore relationships with other concepts. For example, you could ask:

(relatedTo Cow ?X)

This will give you concepts that are semantically related to Cow, such as Milk, Udder, Farm, etc.

Query 3: Find "Part-Of" Relationships

The Part-Of relationship is useful for exploring components or parts of a concept. For example:

(partOf Cow ?X)

This will return things that are part of a Cow, like Udder or Hoof.

Step C: Process the Results and Expand

Once you have the results from these queries, you can expand the set of concepts by finding the nearest related concepts from each of the starting concepts.

Example Expansion (for the concept "Cow"):

  1. Starting Concept: Cow
    • Query: isa Cow ?X
      • Result: Mammal, DomesticAnimal
    • Query: relatedTo Cow ?X
      • Result: Milk, Farm, Udder
    • Query: partOf Cow ?X
      • Result: Udder, Hoof

From Cow, the nearest related concepts are:

    • Mammal
    • DomesticAnimal
    • Milk
    • Farm
    • Udder
    • Hoof
  1. Starting Concept: Milk
    • Query: isa Milk ?X
      • Result: SubstanceProducedByMammals
    • Query: relatedTo Milk ?X
      • Result: Dairy, Farm
    • Query: partOf Milk ?X
      • Result: Cow

From Milk, the nearest related concepts are:

    • SubstanceProducedByMammals
    • Dairy
    • Farm
  1. Starting Concept: Farm
    • Query: isa Farm ?X
      • Result: AgriculturalFacility
    • Query: relatedTo Farm ?X
      • Result: Milk, Cattle, DairyFarm
    • Query: partOf Farm ?X
      • Result: Field, Barn

From Farm, the nearest related concepts are:

    • AgriculturalFacility
    • Cattle
    • DairyFarm
    • Milk
    • Field
    • Barn

Step D: Recursively Expand to New Concepts

If you want to explore even further from each of the nearest concepts, you can repeat the same queries for each new concept that was found. For instance:

  • If Milk led you to Dairy, you can now run:
  • (relatedTo Dairy ?X)

This might give you related concepts like Cheese, Butter, Yogurt, etc.

  • Similarly, if Cattle was found under Farm, you could run:
  • (relatedTo Cattle ?X)

And this might lead you to concepts like Beef, Livestock, etc.

Step E: Visualization or Compilation

Once you’ve collected a large set of related concepts, you can organize or visualize them as a concept graph or network. This allows you to see how the concepts are connected, and explore new insights based on their relationships.  It also enables a user to prune the concepts and to keep those that are germane to his interests.

Example Flow:

  • Start with: Cow
  • Expand: Mammal, DomesticAnimal, Milk, Farm, Udder, Hoof
  • Next: Explore Milk → Dairy, SubstanceProducedByMammals, Farm
  • Next: Explore Farm → AgriculturalFacility, DairyFarm, Cattle, Field, Barn
  • Continue expanding based on relations and parts...

Final Notes:

  • Recursion: You can use recursion to keep expanding from one set of related concepts to the next. For each concept, you check its is-a, related-to, and part-of relationships to find more concepts.
  • Prioritization: Depending on your task, you might prioritize certain relationships (e.g., “is-a” vs. “related-to”) to focus on more hierarchical or semantic links.
  • Reasoning: The ability to reason about relationships (e.g., if "A produces B" and "B is needed for C", then "A may be needed for C") helps enrich the exploration.

Step 5:

Next, we need to automatically create new questions to pose to the LLM.  The simplest way is to begin with the "5W": "why," "when," "how," "what," "where," and "who".  We create new question by applying the "5Ws" to the newly discovered neartest-neighbor concepts.  In order to do so meaningfully, we use the Cyc Query Language (CQL).

CQL has the ability to identify which of the "5W" questions may be applicable to a concept by evaluating the nature of the concept and the relationships it has within the Cyc knowledge base.  Here’s how CQL could potentially help identify which questions can apply:

  1. What: This is generally applied to objects, entities, or types. If the concept is a class or object, "what" could be used to query its characteristics or define what it is. For instance, querying "What is a dog?" or "What are the properties of a cat?"
  2. Where: Applied when the concept involves a location, spatial information, or events tied to geographical or spatial contexts. If the concept is related to a place or location, "where" would likely apply. For instance, "Where is the Eiffel Tower located?"
  3. Who: Applied to concepts that refer to people, individuals, or specific agents. If the concept represents a person or an actor in a particular event, "who" would apply. Example: "Who is the president of the United States?"
  4. When: Used for temporal concepts, events, or instances that are related to time. If the concept has a temporal dimension (such as an event or an occurrence), then "when" would apply. Example: "When did World War II start?"
  5. How: Typically used when the concept is associated with processes, methods, or causes. If the concept is a process, causal relationship, or method of doing something, "how" would be applicable. Example: "How does photosynthesis work?"
  6. Why: Applied for causal explanations or reasons. This question type is most often relevant to concepts related to reasons, causes, or justifications. For instance, "Why do leaves turn yellow in the fall?"

To determine which of these questions can be applied, you would need to check the class or type of concept and its relationships in the knowledge base and then build a query accordingly. For example:

  • What could be queried with: (#$isa #$myConcept #$Thing)
  • Where could be queried with: (#$isa #$myConcept #$Location)
  • Who could be queried with: (#$isa #$myConcept #$Person)
  • When could be queried with: (#$isa #$myConcept #$Time)
  • How could be queried with: (#$isa #$Concept #$Process)
  • Why could be queried with: (#$cause #$myConcept ?Cause)
In this manner, we can programmatically create basic new textual questions to pose to LLMs (via API).  We could also use "And" and "Or" to combinatorially compose those basic questions into new compound questions, which, we can then proceed to pose to the LLMs and generate new results.

One can programmatically invoke summarizer tool (e.g.: QuillBot, Grammarly, Ahrefs, Google Gemini, Vertex AI PaLM API, Document AI, TLDR This, Notta, Semrush, ChatGPT, ClickUp, Get Digest, Scribbr, Summary Generator, Paraphraser.io, Jasper, and Writesonic) to present a summary to the user.

Needless to say, there has to be user interface to any system that is built based on these ideas here to specify the depth and extent of the search for new concepts, to enable canned questions (in addition to the "5W") as well as user defined questions, calibration-like parameters for when to stop the search, how many combinatorial questions to generate, and a flexible architecture in which LLMs, Concept Extraction tools, and Summarize tools could be seamlessly swapped in and out.

I think one application of such an approach could be to explorations of Philosophy of Sciences, e.g., we start with an ontology from a subfield of science such as Physics, use the concepts from that ontology to generate new questions via CYC, and then pose those questions to the Corpus of Thomist and Neo-Thomist philosophy and see what we get.

Wednesday, February 26, 2025

Enhancing Large Language Models with Concept Extraction & Cyc- A Proposal

The initial idea is to create a more structured, semantically rich representation of the generated text of Large Language Models (LLM) such as ChatGPT by leveraging CYC (please see Cyc - Wikipedia) together with Concept Extraction & Concept Mining approaches (please see Concept Extraction - an overview | ScienceDirect Topics & Concept mining - Wikipedia) as described below:

Here's how you could integrate LLM output, concept extraction tools, and a reasoning system like CYC for structured knowledge matching and enhanced reasoning:

Workflow Overview:

  1. Generate Text with LLM:
    • First, you generate text with a large language model (e.g., GPT) based on a given prompt. For example, the prompt could be something like: "Describe the relationship between cows and milk production."
  2. Concept Extraction:
    • Use concept extraction tools to process the LLM's output. This step could involve:
      • Named Entity Recognition (NER) to extract specific entities such as "cow," "milk," "production," etc.
      • Relation extraction to identify the relationships between those entities, such as "cow -> produces -> milk."
      • Coreference resolution to link pronouns and references to the same entity or concept (e.g., "it" refers to "cow").
      • Keyword/Concept extraction to identify key concepts and broader ideas from the text (e.g., "herbivores," "dairy farming").
  3. Mapping Extracted Concepts to CYC:
    • After extracting the relevant concepts and relationships from the LLM's output, you can try to match these concepts against the CYC ontology. The idea is to map the raw concepts to CYC’s structured knowledge to ensure that the relationships make sense and align with CYC’s predefined logic.

For example:

      • Cow: Match it to CYC's concept of a domesticated mammal (or whatever relevant class CYC has for cows).
      • Milk production: Map it to a relationship where cow produces milk, which could be defined in CYC's ontology as a causal relationship or as part of cows' behavior.
      • You can also ensure the semantic accuracy by checking if the extracted relationships (like "cow produces milk") align with CYC's formal knowledge base.
  1. Reasoning with CYC:
    • Once you have the concepts and relationships mapped to CYC's structured knowledge, you can use CYC’s logical reasoning capabilities to:
      • Validate the accuracy of the extracted information by checking if it aligns with existing facts in CYC’s knowledge base.
      • Derive new knowledge by reasoning based on the extracted concepts and CYC’s existing knowledge. For example, if CYC knows that cows are herbivores and produce milk, it could infer or help answer questions like: "What are the dietary needs of cows?" or "How do cows affect dairy farming?"
      • Enrich the information by connecting it to related concepts. For instance, if you extract a concept like “milk,” CYC might link this to other concepts like lactation or dairy production.
  2. Generate Enhanced or Verified Output:
    • Finally, you could generate an enhanced output that combines the strengths of both LLMs and CYC. For example:
      • LLM-generated text: "Cows produce milk, which is a staple food item in many cultures."
      • CYC-enhanced text: After matching concepts and running logic, you might get: "Cows, as herbivores, produce milk, which is used as a source of nutrition in dairy farming. Lactation in cows is supported by a diet rich in grass and supplemented with minerals."

This would not only provide the original output but also incorporate fact-checking, contextual reasoning, and related knowledge from CYC’s ontology.

Advantages of This Approach:

  1. Accuracy: By matching extracted concepts to CYC’s structured knowledge, you can ensure the correctness of the information and reduce the chances of errors or inconsistencies.
  2. Contextual Reasoning: CYC can help to generate more contextually relevant and logically coherent answers by reasoning about how concepts are related (e.g., if the cow produces milk, it must also have a diet that supports lactation).
  3. Enrichment: This hybrid approach allows the model to fill in gaps in knowledge. If an LLM output lacks detail or has ambiguities, CYC can supplement the response with additional structured facts.
  4. Domain-specific Knowledge: If you are working in a specialized domain (e.g., medicine, law, engineering), CYC can provide a deep understanding of the underlying concepts and relationships, ensuring that the model’s output is highly relevant to the domain.

Example Scenario:

Step 1: Generate Text with LLM Prompt: "How does a cow produce milk?"

LLM Output:

  • "Cows produce milk as part of their natural biological processes. The milk is produced in the udder, and the process is triggered after the cow has given birth."

Step 2: Extract Concepts From the LLM output, you extract:

  • Entities: "cow," "milk," "udder," "birth."
  • Relationships: "cow produces milk," "milk is produced in udder," "milk production is triggered after birth."

Step 3: Map Concepts to CYC

  • Cow: Map it to CYC’s concept of domestic animal and mammal and cow
  • Milk: Map it to a type of fluid produced by mammals.
  • Udder: Map it to part of mammal’s body associated with milk production.
  • Birth: Link it to reproduction process in CYC.

Step 4: Reasoning with CYC

  • CYC can infer additional knowledge, such as:
    • Lactation in cows typically begins after childbirth, and it is supported by specific dietary needs (e.g., grass, water).
    • CYC may also note that milk production is a key feature of dairy farming.

Step 5: Enhanced Output Using the knowledge from CYC, you get:

  • "Cows, as mammals, produce milk through lactation, which occurs in the udder after birth. Lactation is a biological process that requires specific nutrients and a conducive environment, typically found in dairy farming practices."

Let's break down the implementation steps in more detail, focusing on how to integrate concept extraction with CYC to reason about LLM-generated output.

Step 1: Generate Text with an LLM (e.g., GPT)

First, you’ll need to generate text using a large language model (LLM) based on your prompt.

Example:

  • Prompt: "How does a cow produce milk?"
  • LLM Output (e.g., GPT): "Cows produce milk as part of their natural biological processes. The milk is produced in the udder, and the process is triggered after the cow has given birth."

At this point, the text generated by the LLM contains useful concepts and information, but it may be unstructured or lack formal logical relationships. So, the next step is to extract meaningful concepts.

Step 2: Extract Concepts from LLM Output

Now, you’ll want to extract meaningful concepts, entities, and relationships from the LLM output. For this, we can use various NLP tools to analyze and process the text. I'll explain some key techniques and libraries you can use to implement this:

Tools for Concept Extraction:

  1. Named Entity Recognition (NER): To extract entities (e.g., "cow," "milk," "udder," "birth").
    • spaCy is a powerful NLP library that can be used for NER.
  2. Relation Extraction: Identifies relationships between entities (e.g., "cow produces milk").
    • OpenIE (Stanford NLP) is a popular tool for relation extraction, or you can fine-tune a transformer-based model for this task.
  3. Coreference Resolution: Resolves which pronouns or phrases refer to the same entity (e.g., "it" referring to "cow").
    • spaCy has a coreference resolution model built-in.
  4. Dependency Parsing: To analyze the grammatical structure of sentences and extract relationships.
    • spaCy also provides dependency parsing.
  5. Key Phrase Extraction: Identifying important concepts or phrases from the text.
    • RAKE (Rapid Automatic Keyword Extraction) can be useful for this.

Example Code to Extract Concepts (Using spaCy):

import spacy

# Load spaCy's pre-trained model

nlp = spacy.load("en_core_web_sm")

# LLM-generated text

text = "Cows produce milk as part of their natural biological processes. The milk is produced in the udder, and the process is triggered after the cow has given birth."

# Process the text with spaCy NLP pipeline

doc = nlp(text)

# Extract entities using NER

entities = [(entity.text, entity.label_) for entity in doc.ents]

print("Entities:", entities)

# Extract relations (simple approach using dependency parsing)

relations = []

for token in doc:

    if token.dep_ in ('nsubj', 'dobj', 'prep'):

        relations.append((token.head.text, token.dep_, token.text))

print("Relations:", relations)


Sample Output:

Entities: [('Cows', 'NORP'), ('milk', 'PRODUCT'), ('udder', 'LOC'), ('birth', 'TIME')]

Relations: [('produce', 'nsubj', 'Cows'), ('produce', 'dobj', 'milk'), ('produced', 'nsubj', 'milk'), ('triggered', 'prep', 'after')]

In the output, we extract entities like cow (as a "NORP" for nationality, religion, or political group), milk (as a "PRODUCT"), and udder (as a "LOCATION"). Additionally, relations are identified based on grammatical dependencies like Cows produce milk.

Step 3: Map Extracted Concepts to CYC

After extracting the relevant concepts and relationships, we now need to map them to CYC’s ontology. CYC uses a formal knowledge base with concepts and relationships that represent human knowledge.

Steps to Integrate CYC:

  1. CYC Knowledge Base: You will need access to CYC’s knowledge base, which contains concepts like "cow," "milk," and relationships such as "produces."
  2. Mapping Concepts: The extracted entities and relationships should be mapped to CYC concepts. For example:
    • Cows → Map to the CYC concept DomesticAnimal (or something more specific in CYC’s ontology).
    • Milk → Map to the CYC concept SubstanceProducedByMammals.
    • Produces → Map to a relationship like produces in CYC’s ontology, which connects a producer (cow) to the product (milk).

This can be accomplished via Cyc API to search for terms like "milk" and "cow" directly. Here's a general approach you could follow:

Use Cyc's API or Query System: Cyc provides a formal querying system where you can search for terms or concepts. You might use the CycL (Cyc Language) or the API to look for "milk" and "cow."

Look for Specific Terms or Relationships:

For "milk," you'd search for the concept or any relationships it has with other concepts like "cow" or "dairy."

For "cow," you'd search for relationships such as "produces" or "gives birth to" and check for how "milk" is connected.

Conceptual Searches: Cyc supports both direct and indirect queries, so you might find that "milk" is related to other concepts like "dairy product," "nutrition," or "cow," while "cow" could be connected to "animal," "mammal," or even more specific categories like "livestock."

Using Semantic Reasoning: Cyc's reasoning engine can also help you find indirect relationships. For example, even if there isn't a direct link between "cow" and "milk," Cyc could deduce it based on other knowledge.

  1. Use CYC’s Reasoning Capabilities: CYC is not just a database of facts, but also a reasoning engine that can infer new information. For example, you can use CYC’s reasoning engine to:
    • Infer that cows are herbivores.
    • Check if the fact "cow produces milk" is consistent with CYC’s knowledge base.
    • Enrich the information by adding related facts (e.g., the cow’s dietary needs for lactation).

Example of Concept Mapping (Hypothetical):

  • Cow → CYC Concept: DomesticAnimal
  • Milk → CYC Concept: SubstanceProducedByMammals
  • Produces → CYC Relationship: produces

Step 4: Use CYC for Reasoning

Once the concepts are mapped to CYC’s ontology, you can perform reasoning tasks, such as:

  1. Fact Validation:
    • Ensure that the statement "Cows produce milk" is logically consistent with CYC’s rules.
    • Use CYC’s inference engine to check relationships like cow → produces → milk.
  2. Enhanced Output Generation:
    • With the reasoning capabilities of CYC, you can generate an enhanced answer to the original question. For example:
      • LLM Output: "Cows produce milk after giving birth."
      • CYC-enhanced Output: "Cows produce milk through lactation after giving birth. Lactation requires a specific diet that includes grass and water."
  3. Fact Augmentation:
    • You can use CYC’s knowledge to fill in gaps, enrich the text, or ensure that all necessary relationships and entities are included.

Example Integration of CYC and Concept Extraction:

  1. Extracted Concept: "Cow produces milk."
  2. Map to CYC: Cow → DomesticAnimal, Milk → SubstanceProducedByMammals, Relationship → produces.
  3. Reason with CYC: CYC checks if a DomesticAnimal (cow) can logically produce a SubstanceProducedByMammals (milk). CYC may also infer that cows are herbivores and require specific nutrition for lactation.
  4. Output Enhanced Information: Based on CYC’s knowledge, generate the final output like:
    • "Cows, as domesticated animals, produce milk after giving birth. Lactation is supported by a diet of grass and water, which is a key aspect of dairy farming."

Step 5: Generate Final Enhanced Output

Finally, after reasoning with CYC, you can generate an output that combines LLM-generated creativity with CYC-enhanced factual correctness.


Final Thoughts

  • Concept extraction can be automated using NLP tools like spaCy, Stanford NLP, or Hugging Face transformers, which allow you to identify entities, relationships, and concepts in the text.
  • By mapping the extracted concepts to CYC’s ontology, you can ensure that the information is logically consistent and relevant.
  • CYC’s reasoning capabilities then help you validate and enrich the extracted information to generate a more accurate and comprehensive response.

This hybrid approach—LLM output combined with concept extraction and reasoning via CYC—can dramatically improve the quality, consistency, and reliability of AI-generated text. It provides a way to validate, enrich, and reason about the concepts presented in the LLM’s output, ensuring that it aligns with structured knowledge and logical reasoning.

Bias in AI Coding Assistants

https://www.infoworld.com/article/3830735/ai-coding-assistants-are-on-a-downward-spiral.html/amp/

About Me

My photo
I had been a senior software developer working for HP and GM. I am interested in intelligent and scientific computing. I am passionate about computers as enablers for human imagination. The contents of this site are not in any way, shape, or form endorsed, approved, or otherwise authorized by HP, its subsidiaries, or its officers and shareholders.

Blog Archive