Home » n. 30 ottobre 2004

RAP: a programming support system for remote users

30 ottobre 2004 | Marco Mari, Alessandro Negri, Agostino Poggi, Paola Turci Dipartimento di Ingegneria dell'Informazione, Università degli Studi di Parma

RAP (Remote Assistant for Programmers) is a multi-agent system that integrates information and expert searching facilities for communities of students and researchers working on related projects, using the Java programming language. RAP associates a personal agent with each user, which helps her/him to solve problems proposing information and answers, extracted from some information repositories, and forwarding answers received by “experts” recommended on the basis of their expertise on the topic. A personal agent also maintains a profile of its user. This profile contains information about the competences and experience of its user and is built by using the answers sent to other users and the code written by the user.

The system is based on seven different kinds of agents: Personal Agents, Code Documentation Managers, Answer Managers, User Profile Managers, Email Managers, Starter Agents and Directory Facilitators. Figure 1 gives a graphical representation of the architecture of the RAP platform; in particular, this figure presents the interactions of the personal agents and of the directory facilitator with the other agents of the platform.

Personal Agents are the agents that allow the interaction between the user and the different parts of the system and, in particular, between the users themselves. Moreover, this agent is responsible for building the user profile and maintaining it when its user is “on-line”. User-agent interaction can be performed in two different ways: when the user is active in the system, through a Web based interface; when it is “off-line” through emails. Usually, there is a Personal Agent for each on-line user, but sometimes Personal Agents are created to interact with “off-line” users via emails.
User Profile Managers are responsible for maintaining the profile of “off-line” users and for activating Personal Agents when it is necessary that they interact with their “off-line” users via emails.
Code Documentation Managers are responsible for maintaining code documentation and for finding the appropriate “pieces of information” to answer the queries done by the users of the system.
Answer Managers are responsible for maintaining the answers done by users during the life of the system and for finding the appropriate answers to the new queries of the users. Besides providing an answer to a user, this agent is responsible for updating the score of the answer and forwarding the vote to either the Personal Agent or the user profile manager for updating the profile of the user that performed such an answer.
Email Managers are responsible for receiving emails from “off-line” users and forwarding them to the corresponding Personal Agents.
Starter Agents have the duty of activating a Personal Agent when either a user logs on or another agent requests it.
Directory Facilitators are responsible for informing an agent about the address of the other agents active in the system (e.g., a Personal Agent can ask about the address of all the other Personal Agents, of the code documentation managers, etc.).

A quite complete description of the behaviour of the system can be given showing the scenario where a user asks information to its Personal Agent to solve a problem in its code and then its Personal Agent finds one (or more) “pieces of information” that may help her/him. This scenario is composed of four main steps: 1) answer types selection, 2) query submission, 3) answers search and 4) answers rating.
Answer types selection: the user can receive information extracted from code documentation, answers extracted from the answer repositories and new answers sent by the other users logged into the system. Therefore, before submitting the query, the user can select the types of answers (one or more) she/he likes to receive.
Query submission: users, through their user interface, provide the query to their Personal Agents. In particular, users can query either about a class or an aggregation of classes for implementing a particular task or about a problem related to their current implementation. The query is composed of two parts. The first part (we call it “annotation”) identifies the context of the query and can contains keywords provided by a system glossary and/or the identification of classes and/or methods in a univocal way (i.e., users need to specify the complete package name for a class and add the class name for a method). The second part contains the textual contents of the query.
Answers search: the Personal Agents perform different actions and interact with different agents to collect the various types of answers. For getting code documentation, the Personal Agent asks the directory facilitator about all the code documentation managers. After receiving this information, the Personal Agent forwards the query to all these agents. These agents search “pieces” of code documentation related to the query and send them to the Personal Agent associating a score with each “piece”.
For getting answers from the answer system repositories, the Personal Agent asks the directory facilitator about all the answer managers. After receiving this information, the Personal Agent forward the query to all these agents. These agents search answers related to the query and send them to the Personal Agent associating a score with each answer.
The reception of new answers from the system users is a more complex activity and its description can be divided in four further steps: 1) experts search, 2) experts rating reception, 3) experts selection, and 4) answers reception.
Experts search: the Personal Agent asks the directory facilitator about the other active Personal Agents (i.e., the Personal Agents of the user that are “on-line”) and all the user profile managers of the system (i.e., the agents managing the profile of the users that are “off-line”). After receiving this information, the Personal Agent forwards the query to these Personal Agents together to the user profile managers.
Expert rating reception: all these agents (Personal Agents and user profile managers) compute the rating of their users to answer to this query on the basis of the query itself and of the user profile. The agents that compute a positive score (i.e., its user may give an appropriate answer to the query) reply to the querying Personal Agent with the rating of their users (in the case of a Personal Agent) or their users (in the case of user profile manager).
Experts selection: the Personal Agent separates on-line and off-line users, order them on the basis of their rating and, finally, presents these two lists to its user. The user can select more than one user and then the Personal Agent sends the query to the corresponding Personal Agents (for the “on-line” users) and to the corresponding user profile managers (for the “off-line” users).
Answers reception: the replying Personal Agents immediately present the query to their user and forward the answer as soon as the user provides it. User profile manager activates the Personal Agents of the involved users through the starter agent. These Personal Agents forward the query to their user via email and then terminate themselves. Users can answer either via email or when they log again on the system. In the case of email, the email manager starts the appropriate Personal Agent that extracts the answer from the email and forwards it. When the querying Personal Agent receives an answer, it immediately forward it to its user.
Answers rating: after the reception of all the queries, or when the deadline for sending them expired, or, finally, when the user has already found an answer satisfying its request, the Personal Agent presents the list of read answers to its user asking her/him to rate them. After the rating, the agent forwards each rating to the corresponding Personal Agent, code documentation manager, answer manager or user profile manager that provides to update the user profile and/or the answer rating (when a user rates an answer retrieved from the answer repository, this rating is also used to updated the user profile of the user that previously proposed the answer). Note that in the case of rating of users answers, the rating cannot be known by the user that sent the answer and users that did not send answers automatically received a negative rating.

Document and user profiles
In our system, the management of document and user profiles is performed in two different phases: an initialization phase and an updating phase. Figure 2 shows a graphical representation of document and user profiles processes.

In order to simplify, speed up and reduce the possibility of inaccuracy due to people’s opinions of themselves and to incomplete information, we decided to build the initial profile of the users and documents in an automated way that, for the users, is very similar to the one used by Expert Finder system [10]. Profiles are represented by vectors of weighted terms whose values are related to the frequency of the term in the document or to the frequency of the use of the term by the user. The set of terms used in the profiles is not extracted from a training set of documents, but corresponds to those terms included in the system glossary, provided to the users for annotating their queries, and to the names of the classes and methods of the Java software libraries used by the community of the users of the system.
While document profiles are computed by using term frequency inverse document frequency (TF-IDF) [9] and profiles weighted terms correspond to the TF-IDF weight, each user profile is built by user’s Personal Agent through the analysis of the Java code she/he has written. In this case, the weight of the terms in the profile corresponds to the frequency is not the TF-IDF weight, but the real frequency of the term in the code of the user (i.e., term frequency is not weighted on the basis of the frequency of the term in the code written by all the users). We used this approach for different reasons. First, we speed up and reduce the complexity of building user profiles. As a matter of fact, TF-IDF algorithm can be easily used in a centralized system where all the profiles and the data to build them are managed. Our context is more complex: the system is distributed, only the Personal Agent can access to the software of its user, for privacy and security reasons, and the profiles are maintained by the corresponding Personal Agents or by possibly different user profile managers when the Personal Agent is not alive. The second and most important reason is that the profile built by the Personal Agents is only the initial user’s profile. And it will be updated when the user writes new software and especially when the user helps other users answering their queries.
The updating of user and document profiles is done in three cases:
1) a user asks about a problem and then rates some of the received answers
2) a new software library is introduced in the ones used by the community or some new terms are introduced in the system glossary
3) a user writes new software
In the first case, there are three possible behaviours according to the source of the answer (user, document repository or answer repository).
If the answer comes from a user, on the basis of the received rating her/his profile is updated (of course, only the part concerning the terms involved in the query annotation). Moreover, if the rating is positive, the answer is added to the answer repository and its profile is built from the query annotation and the rating of the answer.
If the answer comes from the document repository and the rating is positive, the answer is added to the answer repository and its profile is the original document profile updated by the rating of the answer.
Finally, if the answer comes from the answer repository and the rating is positive, the part of the answer profile related to the terms involved in the query annotation is updated on the basis of the received rating. Moreover, in the case that this positive rated answer comes from a user and not from the document repository, also the part of the user profile related to the terms involved in the query annotation is updated on the basis of the received rating. Finally the query corresponding to such positive rated answer is added in the repository (i.e., the answer was good for one or more previous queries, but also for the current one; queries are ordered by answer rating).
We decided to avoid the use of negative rates for updating the profile of the answers in the answer repository. In fact, if an answer is in the repository, it means that at least a user considered as useful to solve her/his problem; therefore, if later this answer received a negative rate it does only means that the answer is not appropriate for the last query, but it is still appropriate for the previous queries for which it received positive rates.
When a new software library is introduced in the list of libraries used by the users of the system or some new terms are introduced in the system glossary, all the document and user profiles must be updated. While document profiles are rebuilt on the basis of the new complete set of terms, user profiles are updated adding the weighted terms corresponding to the new term, of course with a weight equal to their frequency in the software written by the user.
Finally the user’s profile is updated, adding only the new weighted terms, even when the user writes new software.

A first prototype of the RAP System is under development by using JADE [3]. JADE (Java Agent Development framework) is a software framework to aid the realization of agent applications in compliance with the FIPA specifications for interoperable intelligent multi-agent systems [6]. JADE is an Open Source project, and the complete system can be downloaded from JADE Home Page [7].
Given the distributed nature of JADE based agent systems, a RAP system can be distributed on a set of agent platforms connected usually via Internet and situated in different parts of the world. Each agent platform can be distributed on different computation nodes and is connected to a Web server, for allowing direct interactions with the users, and to a mail server, for allowing email interactions with the users. In each agent platform there is a unique starter agent and email agent, but there might be more than one user profile manager, code documentation manager, answer manager. This usually happens when the agent platform is distributed on different nodes in order to cope with performance issues due to the number of the users to be managed. Furthermore, distribution of a RAP platform on different computation nodes and agents replication can be introduced for reliability reasons (in this case, agents manage copies of data) too. Finally, there can be one or more directory facilitators. In the case of more than one directory facilitator, these agents build a hierarchical map of the agents of the system; therefore, when an agent is created, the only information it needs to know is simply the address of the main (root) directory facilitator.

RAP has been used with success by a small set of students, connected by different labs or from their house, for the development JADE software within some course works. In these activities, students could formulate queries annotating it with terms extracted from a glossary derived from the Sun “Glossary of Java Related Terms” [8] and class and method names extracted from Java and JADE source code.
Moreover, we have evaluated the system with a simulation. We have asked 10 queries to 10 students with experience in Java programming, but with advanced experience on different application fields and software libraries. Of course, the 10 queries were defined in order to emphasise the difference in the knowledge of the students involved. Then, we have evaluated the part of the RAP system involving only user interactions (no document and answer repository). A Personal Agent is responsible for performing the 10 queries and other 10 Personal Agent s for providing the answers written by the different students. The evaluation has concerned mainly the comparison of the ordered list (built ordering experts on the basis of their profiles) provided by the querying agent to its user with an ordered list of the answers we did before performing the simulation. The simulation was reiterated a number of times equal to the possible orders of the query and the users profiles were initialized before each simulation. The initial user’s profile was built on the basis of the content of the answers associated with this virtual user. Clearly, it cannot be considered a simulation of the real behaviour of the system, but the obtained results have encouraged us in the completion of the system. In fact, the differences between the Personal Agent ordered list and our a priori ordered list decreases during the evaluation process and for the last query we have had an average error of the 5%.
As from the end of this year, the final RAP system will be tested in practical courses on JADE shared among students of some American Latin and European Universities inside the European Commission funded project “Advanced Technology Demonstration Network for Education and Cultural Applications in Europe and Latin America (@lis Technology Net)” [1]. Moreover, the system will be used by students and researchers, involved in the ANEMONE project [2], for cooperating in the realization of agent-based software.

This work is partially supported by the European Commission through the contracts “@lis Technology Net (ALA/2002/049-055)” and by MIUR through the COFIN project ANEMONE.

[1] @LIS TechNet Home Page. Available from http://www.alis-technet.org.
[2] ANEMONE Home Page. Available from http://aot.ce.unipr.it:8080/anemone.
[3] F. Bellifemine, A. Poggi, G. Rimassa. Developing multi-agent systems with a FIPA-compliant agent framework, Software Practice and Experience, 31:103-128, 2001.
[4] F. Bergenti, A. Poggi, M. Somacher. A Collaborative Platform for Fixed and Mobile Networks, Communications of the ACM, 45(11):39-44, 2002.
[5] F. Bergenti, A. Poggi, M. Somacher, S. Costicoglou COLLABORATOR: A collaborative system for heterogeneous networks and devices, Proc. Int. Conf. on Enterprise System, pp. 447-480, Angers, France, 2003.
[6] FIPA Specifications. Available from http://www.fipa.org.
[7] JADE Home Page. Available from http://jade.tilab.com.
[8] Sun Java Glossary. Available from http://java.sun.com/docs/glossary.html.
[9] G. Salton. Automatic Text Processing. Addison-Wesley, 1989.
[10] A. Vivacqua, H. Lieberman. Agents to Assist in Finding Help, Proc. ACM Conf. on Human Factors in Computing Systems (CHI 2000), pp. 65-72, San Francisco, CA, 2000.

<< Indietro Avanti >>